[TUHS] Bourne shell and comments
chet.ramey at case.edu
Wed Apr 19 06:56:26 AEST 2017
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/
More information about the TUHS