From mboxrd@z Thu Jan 1 00:00:00 1970 From: cowan@mercury.ccil.org (John Cowan) Date: Sun, 16 Jan 2011 04:55:49 -0500 Subject: [TUHS] History of #! interpretation in Unix In-Reply-To: <20110116084330.GA27396@minnie.tuhs.org> References: <20110116084330.GA27396@minnie.tuhs.org> Message-ID: <20110116095548.GC3374@mercury.ccil.org> Warren Toomey scripsit: > Hi all, best wishes for 2011. I had an e-mail from Sven Mascheck asking about > the history of #! interpretation in System V. I couldn't find any #! > code in the kernels before SysVR4. That's correct. The feature was added to the 8th Research edition kernel, but didn't migrate to the System III/V line until SVR4. Shebangs began very early in BSD as a csh-only hack, but appeared as a config option in kernels as early as 2.8BSD, according to Wikipedia; 4.2BSD was the first release that turned them on by default. Perl has always (I think) had its own shebang support; you can get Perl to exec an arbitrary interpreter for a script provided it has a shebang. Modern shells will use /bin/sh to run scripts that *don't* have shebangs, except for ksh which considers itself /bin/sh-compatible, and therefore runs such scripts itself. -- I am expressing my opinion. When my John Cowan honorable and gallant friend is called, cowan at ccil.org he will express his opinion. This is http://www.ccil.org/~cowan the process which we call Debate. --Winston Churchill