From mboxrd@z Thu Jan 1 00:00:00 1970 From: chet.ramey@case.edu (Chet Ramey) Date: Tue, 18 Apr 2017 16:56:26 -0400 Subject: [TUHS] Bourne shell and comments In-Reply-To: <20170418204834.GA22198@minnie.tuhs.org> References: <20170418204834.GA22198@minnie.tuhs.org> Message-ID: <2264b631-2c08-def1-6a55-0f64bce13997@case.edu> On 4/18/17 4:48 PM, Warren Toomey wrote: > I was trying to configure C news on 2.9BSD today and I found that its > Bourne shell doesn't grok # comments. The Bourne shell in 2.11BSD does. > > So I thought: when did the Bourne (and other) shells first grok # as > indicating a comment? Was this in response to #! being added to the > kernel, or was it the other way around? And was the choice of #! > arbitrary, or was it borrowed from somewhere else? The Bourne shell got `#' comments in System III. csh had them very early. I'm pretty sure Dennis Ritchie suggested the `#!' syntax before they were added to the System III sh, but not much earlier. ISTR that the Berkeley Pascal system had something like `#!' first. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet at case.edu http://cnswww.cns.cwru.edu/~chet/