From mboxrd@z Thu Jan 1 00:00:00 1970 From: cowan@mercury.ccil.org (John Cowan) Date: Sun, 16 Jan 2011 16:37:38 -0500 Subject: [TUHS] History of #! interpretation in Unix In-Reply-To: <20110116210812.GB26424@lisa.in-ulm.de> References: <20110116084330.GA27396@minnie.tuhs.org> <20110116095548.GC3374@mercury.ccil.org> <20110116132039.GA16484@lisa.in-ulm.de> <20110116171715.GD3374@mercury.ccil.org> <20110116191942.GA26424@lisa.in-ulm.de> <20110116201745.GE3374@mercury.ccil.org> <20110116210812.GB26424@lisa.in-ulm.de> Message-ID: <20110116213738.GG3374@mercury.ccil.org> Sven Mascheck scripsit: > who (or what system) do you mean was the 2nd? That was hypothetical. Trying again: "It's unlikely that two different people chose #! as the executable-script mark independently." > With /bin/sh you actually meant any shell calling "itself"? > Otherwise I'm afraid, I have some difficulties following you. I mean that whereas (t)csh uses /bin/sh to run scripts with no shebangs, the Posix-compatible shells execute scripts with no shebangs directly. And this is Bad. > > IMHO the Posix sh definition should be extended so that all > > shells claiming Posix-compliance should do shebangs. > > Shells themselves should implement it, not the kernel? It might be too much to ask the kernel to do, especially on non-traditional Posix systems like z/OS. > There was a working group resolution to standardize #!, which didn't > make it, http://www.opengroup.org/platform/resolutions/bwg2000-004.html > you could chime in I see the problem now: a portable awk script, for example, can't assume that the Posix awk is in /usr/bin/awk, so "#!/usr/bin/awk" might get the wrong awk. So the feature is not worth standardizing for Posix. -- [W]hen I wrote it I was more than a little John Cowan febrile with foodpoisoning from an antique carrot cowan at ccil.org that I foolishly ate out of an illjudged faith http://ccil.org/~cowan in the benignancy of vegetables. --And Rosta