From mboxrd@z Thu Jan 1 00:00:00 1970 From: tfb@tfeb.org (Tim Bradshaw) Date: Mon, 17 Jan 2011 10:09:40 +0000 Subject: [TUHS] History of #! interpretation in Unix In-Reply-To: <20110116201745.GE3374@mercury.ccil.org> 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> Message-ID: On 16 Jan 2011, at 20:17, John Cowan wrote: > That might account for the "#", but not for "#!" taken together. > Having two different people invent the shebang independently (as opposed > to *implementing* it independently, as has happened many times -- 8th > Edition, SVR4, Linux, etc.) is just too improbable for me to swallow. One possibility is that there was prior art for "!" meaning "run in a shell" which gave various people the same idea independently: in a script it needs to be commented out so the shell will not barf, so you pretty naturally get "#!" as the magic sequence. That's really arguing that the inventions were not independent but they were both copying from something else. The obvious place that "!" might have come from is ed: it seems to have been there essentially for ever (the 1st edition manuals have it). --tim