From mboxrd@z Thu Jan 1 00:00:00 1970 From: mascheck@in-ulm.de (Sven Mascheck) Date: Wed, 19 Jan 2011 21:35:06 +0100 Subject: [TUHS] History of #! interpretation in Unix In-Reply-To: <4D366439.8020808@laposte.net> References: <20110116084330.GA27396@minnie.tuhs.org> <4D366439.8020808@laposte.net> Message-ID: <20110119203506.GB12678@lisa.in-ulm.de> 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. > > http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/sys/sys/sys1.c 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. -- http://www.in-ulm.de/~mascheck/various/shebang/#results