The shebang line in the Unix script should indicate the full path, so this is:
#!/usr/local/bin/ruby
but this is not so:
The problem with the first form is that you need to use the full path, but the actual path will not be the same for all systems. The env utility is often used to allow a script to look for the PATH environment variable for the corresponding interpreter, env should always be in /usr/bin/env so that you can safely use this as the full path, and then allow env find PATH for the named interpreter.
From the exact guide :
env [-i] [name=value]... [utility [argument...]]
The env utility should get the current environment, change it according to its arguments, and then call the utility, called the operand of the utility, with the changed environment.
This is not very useful in your case, but I decided that I should include it anyway. Using shebang env is a hack bit that does not use the env supposed behavior.
mu is too short
source share