On Tuesday, November 26, 2002, at 04:40 PM, Chris wrote:
No problem, this is the way people learn. Also, the situation is somewhat blurry for historical reasons - the first support for shebang lines *was* in shells, but it's much better to do it at the system level (see a 1980 message from Dennis Ritchie: http://www.uni-ulm.de/~s_smasch/various/shebang/sys1.c.html), so current shells usually don't do this.On Monday, November 25, 2002, at 11:20 PM, Ken Williams wrote:I appear to have grossly misunderstood discussion on a different list regarding what the kernel did vs what the shell did. I apologize for worsening the S/N ratio here.On Tuesday, November 26, 2002, at 03:38 PM, Chris wrote:The following source says otherwise, as do some knowledgeable unix geeks I've asked ...On Monday, November 25, 2002, at 10:09 PM, Ken Williams wrote:There's nothing perl can do about this - the OS (in fact, the kernel, I think) reads that shebang line in order to know it should call perl. By the time perl gets to look at it, it's too late.Kernel not involved. Shell looks to determine with which application to launch executable.
Mea cupla!
On OS X, when I look at 'man tcsh' (most OS X users' default shell) and search for '#!', I see some discussion of it. The shell *can* be compiled with the 'hb' option to emulate the kernel's shebang processing, but on OS X as Apple ships it, this option is not activated.
So you've got some good reasons for being confused. ;-)
[Note that I've trimmed p5p from the recipient list, since most people there probably already know this stuff...]
-Ken