[TUHS] History of #! interpretation in Unix
mascheck at in-ulm.de
Thu Jan 20 06:35:06 AEST 2011
Cyrille Lefevre wrote:
> yet another reference but more in the spirit of what csh does, it only
> checks for a simple hash (#), no explaim mark (!), and is enclosed in
> UCB_SCRIPT define.
Perhaps you missed the ! in the macro?
#define SCRMAG '#!'
> 2.11 BSD seems to have an enhanced version of this feature in the sense
> where the shell path may be followed by some arguments (i.e.: /bin/sh -x)
Yes, #! originally had not implemented arguments at all (this even applies
to 386BSD). Arguments ("all in one") came with 4.2BSD and later, variations
appeared like splitting up into argv or delivering only the "first" argument.
More information about the TUHS