Mail Archives: djgpp/2003/02/10/05:46:53
abc AT anchorageinternet DOT org wrote:
> this does seem to be an ambiguous area, so, even after sleeping, i
> think it's more sane to allow arguments to a script given to an
> interpreter on the shebang line, passing everything after
> "#!/interpreter [arg]" to an "eval" or "sh -c" ...
As DJ already pointed out, this has nothing to do with bash. #! is a
feature of the Unix kernel API.
The ambiguity, if any, is one aspect of the big old cross-Unix
portability problem. Different Unices behave ever so slightly
differently, in some of their core aspects, and this is one of them.
The core of the issue is that
#! interpreter [_one_ optional argument]
is all you can really *rely* on, for a portable script, because that's
all the Unix standardization groups managed to agree on. Some
platforms (including Linux, IIRC) will give your more flexibility, but
others won't, and the standards don't require them to. DJGPP
apparently is in the latter group.
Scripts that need more than this are essentially broken --- and it's
not DJGPP that broke them.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -