[TUHS] History of #! interpretation in Unix

Cyrille Lefevre cyrille.lefevre-lists at laposte.net
Wed Jan 19 14:10:33 AEST 2011


Le 17/01/2011 20:02, Jeremy C. Reed a écrit :
>
> 4BSD (4.0) usr/src/sys/sys/TODO (of Nov.  9, 1980) says it was planned:
>
> 	6. Exec fixes
>          	Implement dmr's #! feature; pass string arguments through
> 		faster.
>
> And the usr/src/sys/newsys/sys1.c has explanation of it and source code.
>
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/sys/sys/TODO
>
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/sys/newsys/sys1.c
>
> This seems to indicate the idea was not developed separately at
> Berkeley.
>
> It was introduced into BSD by April 1981. For 2BSD (2.8) it was added by
> Dec. 16, 1981 when built with MENLO_SCRIPT defined (but I don't see that
> documented or defined).

Hi,

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.

http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/sys/sys/sys1.c

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)

http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/sys/sys/kern_exec.c

Regards,

Cyrille Lefevre
-- 
mailto:Cyrille.Lefevre-lists at laposte.net





More information about the TUHS mailing list