Why use env in shebang?
Some people might use a different python (perl, etc.) than the system one. /usr/bin/env python
would run the version configured as the current one, possibly making the script more portable.
On the other hand, reportedly, some systems do not have /usr/bin/env
. Also, you cannot use #!/usr/bin/env foo x
as a replacement for #!foo x
, because foo x
will be interpreted as a single argument. So the value of the approach is debatable.