On Sun, Sep 11, 2016 at 02:27:48PM -0400, Dan Cross wrote:
On Sun, Sep 11, 2016 at 1:39 PM, Doug McIlroy
<doug(a)cs.dartmouth.edu> wrote:
IIRC #!
originated at Bell Labs but it got out to the world via BSD.
Perhaps Dr. McIlroy could confirm / deny / expand upon the details
(please?)
I recall Dennis discussing the feature at some length before installing it.
So the exact semantics, especially the injected argument, are almost]
certainly his. I don't know whether he built on a model from elsewhere.
#! appeared between v7 (1979) and v8 (1985). As v8 was never released,
it clearly made its way into the world via BSD and USG. BSD, being
more nimble, was likely first.
Also, 8th edition was essentially a re-port of 4.1c BSD, correct? If it
were already in BSD, it could conceivably come back into 8th edition via
that route. I found the following in /usr/src/sys/sys/TODO for 4.0BSD:
6. Exec fixes
> Implement dmr's #! feature; pass string arguments through faster.
See 4.0BSD /usr/src/sys/newsys/sys1.c
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/sys/newsys/sys1.c
for two mails from Dennis to Berkeley, sending the info and code.
From dmr Thu
Jan 10 04:25:49 1980 remote from research
The system has been changed so that if a
file being executed
begins with the magic characters #! , [...]
I tried to follow all the traces of #! and collected the results on
http://www.in-ulm.de/~mascheck/various/shebang/
I'd be happy to add and fix stuff, if somebody spots anything.
Warren, one has to be careful not to have trailing slashes in web archive URLs.
(e.g., after modifying URLs by hand). Example: calling
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/sys/
eventually results in the link
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/sys//sys/TODO
which yields "...is not a known file.", while
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/sys/sys/TODO
is valid.
-Sven