Op 27-04-18 om 18:52 schreef Garrett Wollman:
<<On Fri, 27 Apr 2018 16:11:55 +0000, "Wheeler, David A" <dwhee...@ida.org> 
said:

The "#!" should be standardized - at this point, if your system doesn't support 
it,
everyone will consider your system broken.

I realize that there's some concern about standardizing pathnames, but
standardizing "/usr/bin/env" seems extremely reasonable, as well as bare names like 
"bash".

There's no need to standardize the actual pathname; a script can
include installation instructions to add the shebang (with an
appropriate, system-specified path), or indeed can come with an
installation script that does so automatically by invoking "command
-v" to find the path to the desired interpreter.

That installation script would need a way to run without editing that path (or explicitly specifying the shell on the command line) in the first place, or it would be a bit pointless.

I don't know of any way to accomplish that except by the de-facto standard mechanism of "#! /usr/bin/env sh". There is a long-time and highly widespread expectation that this will work.

  In addition to shell
scripts, the shebang hack is also commonly used with awk and sed
scripts (just to name two other POSIX-specified languages).

IMO, that's another good reason to standardise the hashbang path plus the location of /usr/bin/env.

Thanks for the feedback,

- M.

Reply via email to