The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Bourne shell and comments
@ 2017-04-19 19:18 Doug McIlroy
  0 siblings, 0 replies; 38+ messages in thread
From: Doug McIlroy @ 2017-04-19 19:18 UTC (permalink / raw)


> Is this a reason why "#" was chosen as the root prompt, by the way?

No. # was adopted as superuser prompt  before the shell had a
comment convention.

Doug


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-20  3:50         ` Andy Kosela
  2017-04-20  4:47           ` Warner Losh
@ 2017-04-22  2:46           ` Dave Horsfall
  1 sibling, 0 replies; 38+ messages in thread
From: Dave Horsfall @ 2017-04-22  2:46 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

On Wed, 19 Apr 2017, Andy Kosela wrote:

>       Heh apparently I missed Sven's links below his name... Well, nice 
>       writeup :) 
> 
> Yes indeed.  So while we are at it can we settle down once and for all 
> why and when the term "shebang" originated?  Is it derived from "shell 
> bang", or "sharp bang"?

Well, just to stir the possum a little, I've always called it "hash bang".

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-21 18:15 ` Clem Cole
@ 2017-04-21 19:13   ` Steve Johnson
  0 siblings, 0 replies; 38+ messages in thread
From: Steve Johnson @ 2017-04-21 19:13 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

I always kind of liked octothorpe,  the "official" AT&T name for the
# key on your phone...   Why use one syllable when three will do?

Steve

----- Original Message -----
From:
 "Clem Cole" <clemc at ccc.com>

To:
"Doug McIlroy" <doug at cs.dartmouth.edu>
Cc:
"TUHS main list" <tuhs at minnie.tuhs.org>
Sent:
Fri, 21 Apr 2017 14:15:08 -0400
Subject:
Re: [TUHS] Bourne shell and comments

On Fri, Apr 21, 2017 at 1:03 PM, Doug McIlroy <doug at cs.dartmouth.edu
[1]>
 wrote:

"sharp" as the name of # -- not "number", not "pound", and definitely
 not "hash" -- so shell scripts began with sharp-bang.

​Amen....​

 

Links:
------
[1] mailto:doug at cs.dartmouth.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170421/3a24d866/attachment-0001.html>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-21 17:03 Doug McIlroy
@ 2017-04-21 18:15 ` Clem Cole
  2017-04-21 19:13   ` Steve Johnson
  0 siblings, 1 reply; 38+ messages in thread
From: Clem Cole @ 2017-04-21 18:15 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

On Fri, Apr 21, 2017 at 1:03 PM, Doug McIlroy <doug at cs.dartmouth.edu> wrote:

> "sharp" as the name of # -- not "number", not "pound", and definitely
> not "hash" -- so shell scripts began with sharp-bang.
>

​Amen....​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170421/933b241f/attachment.html>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
@ 2017-04-21 17:03 Doug McIlroy
  2017-04-21 18:15 ` Clem Cole
  0 siblings, 1 reply; 38+ messages in thread
From: Doug McIlroy @ 2017-04-21 17:03 UTC (permalink / raw)


"Shebang". Nice coinage (which I somehow hadn't heard before).
Very much  in tune with Bell Labs, where Vic Vyssotsky had instilled
"sharp" as the name of # -- not "number", not "pound", and definitely
not "hash" -- so shell scripts began with sharp-bang.

Doug


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-21 14:22                 ` Andy Kosela
@ 2017-04-21 14:45                   ` Ron Natalie
  0 siblings, 0 replies; 38+ messages in thread
From: Ron Natalie @ 2017-04-21 14:45 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

Amusingly, people were asking this question in 2000.   I found this in comp.unix.shell:

 

in news: at.linux, there's a discussion about why the
interpretersymbol #! is called shebang (you can imagine, which
theories already occurred). but does anybody know, WHY this is really
called shebang?

sorry for being a bit offtopic, but it's essential :)

thanks before.

Stefan

No origins were found in the messages other than a guess that it was a cute shortening of “SHARP BANG.”



Wasn’t it Ken Thompson who said if he had it to do over again he’d have put an “e” on the end of create.    Five decades of calling it “CREE – AT”

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170421/c7a2811a/attachment.html>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS]  Bourne shell and comments
  2017-04-21 10:54               ` Ron Natalie
@ 2017-04-21 14:22                 ` Andy Kosela
  2017-04-21 14:45                   ` Ron Natalie
  0 siblings, 1 reply; 38+ messages in thread
From: Andy Kosela @ 2017-04-21 14:22 UTC (permalink / raw)


On Friday, April 21, 2017, Ron Natalie <ron at ronnatalie.com
<javascript:_e(%7B%7D,'cvml','ron at ronnatalie.com');>> wrote:

> Shebang is very old.   Earliest uses are around 1862 according to the
> OED.    It's listed as American Slang of obscure origin.
>

Most of us are probably familiar with the word, but it is more interesting
when and why it was first used in the context of '#!'.  It seems Dennis did
not use that term in the beginning.

--Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170421/3ddfd3c3/attachment-0001.html>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-21  3:28     ` arnold
  2017-04-21  3:43       ` Bakul Shah
  2017-04-21 11:18       ` Clem cole
@ 2017-04-21 13:20       ` Michael Kjörling
  2 siblings, 0 replies; 38+ messages in thread
From: Michael Kjörling @ 2017-04-21 13:20 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

On 20 Apr 2017 21:28 -0600, from arnold at skeeve.com:
>> The # was nod to the # being the first characters of the C program to say
>> to use the preprocessor; but I've forgotten why the bang was added before
>> the path.    It could have been almost anything.
> 
> Perhaps reminiscent of the '!' escape to shell in ed and maybe
> some other interactive programs of the time?  That's purely a guess
> on my part.

How about that # could start a C preprocessor directive, but no C
preprocessor directives begins with `!'? Makes it easy for the C
compiler or preprocessor to check that it isn't being fed a random
script.

-- 
Michael Kjörling • https://michael.kjorling.se • michael at kjorling.se
                 “People who think they know everything really annoy
                 those of us who know we don’t.” (Bjarne Stroustrup)


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-21  3:28     ` arnold
  2017-04-21  3:43       ` Bakul Shah
@ 2017-04-21 11:18       ` Clem cole
  2017-04-21 13:20       ` Michael Kjörling
  2 siblings, 0 replies; 38+ messages in thread
From: Clem cole @ 2017-04-21 11:18 UTC (permalink / raw)


It is quite possible.  But I think it might have been the other way around that Dennis got the idea from elsewhere. 

Sent from my PDP-7 Running UNIX V0 expect things to be almost but not quite. 

> On Apr 20, 2017, at 11:28 PM, arnold at skeeve.com wrote:
> 
> I thought it was pretty well established that DMR invented it and
> told the UCB guys about it? There's an email in the archives from
> him, too.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-21  1:42             ` Nemo
@ 2017-04-21 10:54               ` Ron Natalie
  2017-04-21 14:22                 ` Andy Kosela
  0 siblings, 1 reply; 38+ messages in thread
From: Ron Natalie @ 2017-04-21 10:54 UTC (permalink / raw)


Shebang is very old.   Earliest uses are around 1862 according to the OED.    It's listed as American Slang of obscure origin.




^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-21  3:43       ` Bakul Shah
@ 2017-04-21  6:07         ` Steve Nickolas
  0 siblings, 0 replies; 38+ messages in thread
From: Steve Nickolas @ 2017-04-21  6:07 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]

On Thu, 20 Apr 2017, Bakul Shah wrote:

> From the horse’s mouth (as per https://www.talisman.org/~erlkonig/documents/dennis-ritchie-and-hash-bang.shtml ):
>
>
> From: "Ritchie, Dennis M (Dennis)** CTR **" <dmr at research.bell-labs.com>
> To: <erlĸonigⓐtαlismαn.org>
>
> Date: Thu, 19 Nov 2009 18:37:37 -0600
> Subject: RE: What do -you- call your #!<something> line?
>
> I can't recall that we ever gave it a proper name.
> It was pretty late that it went in--I think that I
> got the idea from someone at one of the UCB conferences
> on Berkeley Unix; I may have been one of the first to
> actually install it, but it was an idea that I got
> from elsewhere.
>
> As for the name: probably something descriptive like
> "hash-bang" though this has a specifically British flavor, but
> in any event I don't recall particularly using a pet name
> for the construction.
>
>   Regards,
>   Dennis
>
>
> [Sorry about the html]

In the process of replying, I've de-htmlized it. ;)

Anyway, I use "pound-bang" which is basically the same thing, although I 
must say it has a particular violent quality about it...

-uso.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-21  3:28     ` arnold
@ 2017-04-21  3:43       ` Bakul Shah
  2017-04-21  6:07         ` Steve Nickolas
  2017-04-21 11:18       ` Clem cole
  2017-04-21 13:20       ` Michael Kjörling
  2 siblings, 1 reply; 38+ messages in thread
From: Bakul Shah @ 2017-04-21  3:43 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-20 20:13   ` Clem Cole
  2017-04-20 20:17     ` Chet Ramey
@ 2017-04-21  3:28     ` arnold
  2017-04-21  3:43       ` Bakul Shah
                         ` (2 more replies)
  1 sibling, 3 replies; 38+ messages in thread
From: arnold @ 2017-04-21  3:28 UTC (permalink / raw)


Clem Cole <clemc at ccc.com> wrote:

> below...
>
> On Tue, Apr 18, 2017 at 4:51 PM, Ron Natalie <ron at ronnatalie.com> wrote:
>
> > I believe the Berkeley #! magic number came first.
>
> That's right.... the #!path syntax was BSDism that went main stream
> because of its usefulness with "little languages" not just the shell.
>  I'd have to check the tapes but it may have gone back as far as the
> original BSD ~77/78 - Ken would have brought it back after his sabbatical
> (or not - he would have seen it).

I thought it was pretty well established that DMR invented it and
told the UCB guys about it? There's an email in the archives from
him, too.

Dr. McIlroy? Can you clarify?

> The # was nod to the # being the first characters of the C program to say
> to use the preprocessor; but I've forgotten why the bang was added before
> the path.    It could have been almost anything.

Perhaps reminiscent of the '!' escape to shell in ed and maybe
some other interactive programs of the time?  That's purely a guess
on my part.

My two cents,

Arnold


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-20  4:47           ` Warner Losh
@ 2017-04-21  1:42             ` Nemo
  2017-04-21 10:54               ` Ron Natalie
  0 siblings, 1 reply; 38+ messages in thread
From: Nemo @ 2017-04-21  1:42 UTC (permalink / raw)


On 20 April 2017 at 00:47, Warner Losh <imp at bsdimp.com> wrote:
> On Wed, Apr 19, 2017 at 9:50 PM, Andy Kosela <akosela at andykosela.com> wrote:
[...]
>> Yes indeed.  So while we are at it can we settle down once and for all why
>> and when the term "shebang" originated?  Is it derived from "shell bang", or
>> "sharp bang"?
>
> That would be too neat... And these things get harder with time...

Yes, it would be nice to know the origin of the whole shebang.

N.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-20 16:39     ` Sven Mascheck
@ 2017-04-20 21:42       ` Steffen Nurpmeso
  0 siblings, 0 replies; 38+ messages in thread
From: Steffen Nurpmeso @ 2017-04-20 21:42 UTC (permalink / raw)


Sven Mascheck <mascheck at in-ulm.de> wrote:

 |On Thu, Apr 20, 2017 at 12:07:28AM +0200, Steffen Nurpmeso wrote:
 |> Hmm.  Kurt Shoens added # as a null() saying "The do nothing
 |> command for comments." before that (2BSD, file copyright 1979).
 |
 |Is it possible that you were looking at 2BSD/src/Mail/cmd3.c?
 |2BSD is an add-on for V6, without any Bourne shell.

Oh yes, sorry.  Mail that is.  (And lead there from cmdtab.c.)

--steffen


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-20 20:13   ` Clem Cole
@ 2017-04-20 20:17     ` Chet Ramey
  2017-04-21  3:28     ` arnold
  1 sibling, 0 replies; 38+ messages in thread
From: Chet Ramey @ 2017-04-20 20:17 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]

On 4/20/17 4:13 PM, Clem Cole wrote:

>     the Bourne shells grudgingly followed.
> 
> ​Yep - although, like Warren I don't remember how soon.   

System III

-- 
``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/


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 20:51 ` Ron Natalie
  2017-04-18 21:45   ` Grant Taylor
  2017-04-19  0:50   ` Lyndon Nerenberg
@ 2017-04-20 20:13   ` Clem Cole
  2017-04-20 20:17     ` Chet Ramey
  2017-04-21  3:28     ` arnold
  2 siblings, 2 replies; 38+ messages in thread
From: Clem Cole @ 2017-04-20 20:13 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]

below...

On Tue, Apr 18, 2017 at 4:51 PM, Ron Natalie <ron at ronnatalie.com> wrote:

> I believe the Berkeley #! magic number came first.

​That's right....​ the #!path syntax was BSDism that went main stream
because of its usefulness with "little languages" not just the shell.
 I'd have to check the tapes but it may have gone back as far as the
original BSD ~77/78 - Ken would have brought it back after his sabbatical
(or not - he would have seen it).

The # was nod to the # being the first characters of the C program to say
to use the preprocessor; but I've forgotten why the bang was added before
the path.    It could have been almost anything.

But the #!path syntax really was a great idea and opened up a lot of
different pseudo built-in scripting languages we think go with UNIX today.
But back in the day, their were not that many to start.




> The C Shell already
> ​ ​
> used this as a comment,

​exactly.​


> the Bourne shells grudgingly followed.
>
​Yep - although, like Warren I don't remember how soon.   The thing was you
programmed to V7 [Bourne] syntax and typed to C shell [I still do - the
rom's in the my fingers are not erasable].   I do remember commenting
Bourne scripts, so it must have come early in the Vax line, although its
strange the 2.x did not pick it up, until it seems 2.11 which is pretty
late.



>
> I still remember using : for a comment in the V6 shell.   Was also the
> label
> for goto.
>
​Yep - I remember that also - it worked...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170420/037338b8/attachment-0001.html>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19 22:07   ` Steffen Nurpmeso
  2017-04-20  0:31     ` shawn wilson
@ 2017-04-20 16:39     ` Sven Mascheck
  2017-04-20 21:42       ` Steffen Nurpmeso
  1 sibling, 1 reply; 38+ messages in thread
From: Sven Mascheck @ 2017-04-20 16:39 UTC (permalink / raw)


On Thu, Apr 20, 2017 at 12:07:28AM +0200, Steffen Nurpmeso wrote:
> Hmm.  Kurt Shoens added # as a null() saying "The do nothing
> command for comments." before that (2BSD, file copyright 1979).

Is it possible that you were looking at 2BSD/src/Mail/cmd3.c?
2BSD is an add-on for V6, without any Bourne shell.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-20  3:50         ` Andy Kosela
@ 2017-04-20  4:47           ` Warner Losh
  2017-04-21  1:42             ` Nemo
  2017-04-22  2:46           ` Dave Horsfall
  1 sibling, 1 reply; 38+ messages in thread
From: Warner Losh @ 2017-04-20  4:47 UTC (permalink / raw)


On Wed, Apr 19, 2017 at 9:50 PM, Andy Kosela <akosela at andykosela.com> wrote:
>
> On Wednesday, April 19, 2017, shawn wilson <ag4ve.us at gmail.com> wrote:
>>
>> Heh apparently I missed Sven's links below his name... Well, nice writeup
>> :)
>
>
> Yes indeed.  So while we are at it can we settle down once and for all why
> and when the term "shebang" originated?  Is it derived from "shell bang", or
> "sharp bang"?

That would be too neat... And these things get harder with time...

Warner


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-20  0:35       ` shawn wilson
@ 2017-04-20  3:50         ` Andy Kosela
  2017-04-20  4:47           ` Warner Losh
  2017-04-22  2:46           ` Dave Horsfall
  0 siblings, 2 replies; 38+ messages in thread
From: Andy Kosela @ 2017-04-20  3:50 UTC (permalink / raw)


On Wednesday, April 19, 2017, shawn wilson <ag4ve.us at gmail.com> wrote:

> Heh apparently I missed Sven's links below his name... Well, nice writeup
> :)
>

Yes indeed.  So while we are at it can we settle down once and for all why
and when the term "shebang" originated?  Is it derived from "shell bang",
or "sharp bang"?

--Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170419/e1499410/attachment.html>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-20  0:31     ` shawn wilson
@ 2017-04-20  0:35       ` shawn wilson
  2017-04-20  3:50         ` Andy Kosela
  0 siblings, 1 reply; 38+ messages in thread
From: shawn wilson @ 2017-04-20  0:35 UTC (permalink / raw)


Heh apparently I missed Sven's links below his name... Well, nice writeup
:)

On Apr 19, 2017 8:31 PM, "shawn wilson" <ag4ve.us at gmail.com> wrote:

This is a bit old (hope someone has archived it incase the account is ever
deleted) but this is the shebang history reference I've ref'd a few times
(comes right after the Wikipedia hits when searching for "shebang history"
in Google - for me anyway).

https://www.in-ulm.de/~mascheck/various/shebang/

It'd be interesting to hear if the group finds any inaccuracies or knows of
anything more thorough on the topic.

On Apr 19, 2017 6:05 PM, "Steffen Nurpmeso" <steffen at sdaoden.eu> wrote:

> Sven Mascheck <mascheck at in-ulm.de> wrote:
>  |On Wed, Apr 19, 2017 at 06:48:34AM +1000, 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?
>  |>
>  |> Datum point: 2.9BSD's kernel can recognise #!, but the sh can't
> recognise \
>  |> #.
>  |
>  |Dennis' email about #! to Berkeley is dated Jan 10 '80.
>  |I've never seen any hint, how the bang in #! was chosen. Looks racy \
>  |at least..
>  |#! on BSDs was available as compile time option in 4.0BSD (~Oct '80?)
>  |and default on 4.2BSD (~Sep '83).
>  |BTW, AFAIK, the #! implementation in 2.8BSD (compile time option) is not
>  |from research but seems to come from U.S. Geological Survey, Menlo Park.
>  |
>  |The BSD csh hack in sh&csh (# special as first character in a file, \
>  |service.c),
>  |came with 3BSD, also in '80.
>  |
>  |I found # as comment character in the BSD-sh first in CSRG 4.1.snap
>  |(~Apr '81, word.c). And at Bell Labs, as mentioned, it came with SysIII,
> \
>  |also ~81.
>  |BTW, 4.3BSD ('86), and thus 2.10 BSD, brought an interesting change:
>  |# is only recognized in non-interactive mode. In interactive mode
>  |you actually get this:
>  |  $ # echo x
>  |  #: not found
>  |This was not changed in 4BSD until sh was replaced by ash in 4.3 Net/2.
>
> Hmm.  Kurt Shoens added # as a null() saying "The do nothing
> command for comments." before that (2BSD, file copyright 1979).
>
> --steffen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170419/cc6db91d/attachment.html>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19 22:07   ` Steffen Nurpmeso
@ 2017-04-20  0:31     ` shawn wilson
  2017-04-20  0:35       ` shawn wilson
  2017-04-20 16:39     ` Sven Mascheck
  1 sibling, 1 reply; 38+ messages in thread
From: shawn wilson @ 2017-04-20  0:31 UTC (permalink / raw)


This is a bit old (hope someone has archived it incase the account is ever
deleted) but this is the shebang history reference I've ref'd a few times
(comes right after the Wikipedia hits when searching for "shebang history"
in Google - for me anyway).

https://www.in-ulm.de/~mascheck/various/shebang/

It'd be interesting to hear if the group finds any inaccuracies or knows of
anything more thorough on the topic.

On Apr 19, 2017 6:05 PM, "Steffen Nurpmeso" <steffen at sdaoden.eu> wrote:

> Sven Mascheck <mascheck at in-ulm.de> wrote:
>  |On Wed, Apr 19, 2017 at 06:48:34AM +1000, 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?
>  |>
>  |> Datum point: 2.9BSD's kernel can recognise #!, but the sh can't
> recognise \
>  |> #.
>  |
>  |Dennis' email about #! to Berkeley is dated Jan 10 '80.
>  |I've never seen any hint, how the bang in #! was chosen. Looks racy \
>  |at least..
>  |#! on BSDs was available as compile time option in 4.0BSD (~Oct '80?)
>  |and default on 4.2BSD (~Sep '83).
>  |BTW, AFAIK, the #! implementation in 2.8BSD (compile time option) is not
>  |from research but seems to come from U.S. Geological Survey, Menlo Park.
>  |
>  |The BSD csh hack in sh&csh (# special as first character in a file, \
>  |service.c),
>  |came with 3BSD, also in '80.
>  |
>  |I found # as comment character in the BSD-sh first in CSRG 4.1.snap
>  |(~Apr '81, word.c). And at Bell Labs, as mentioned, it came with SysIII,
> \
>  |also ~81.
>  |BTW, 4.3BSD ('86), and thus 2.10 BSD, brought an interesting change:
>  |# is only recognized in non-interactive mode. In interactive mode
>  |you actually get this:
>  |  $ # echo x
>  |  #: not found
>  |This was not changed in 4BSD until sh was replaced by ash in 4.3 Net/2.
>
> Hmm.  Kurt Shoens added # as a null() saying "The do nothing
> command for comments." before that (2BSD, file copyright 1979).
>
> --steffen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170419/3f893309/attachment-0001.html>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19 21:02 ` Sven Mascheck
@ 2017-04-19 22:07   ` Steffen Nurpmeso
  2017-04-20  0:31     ` shawn wilson
  2017-04-20 16:39     ` Sven Mascheck
  0 siblings, 2 replies; 38+ messages in thread
From: Steffen Nurpmeso @ 2017-04-19 22:07 UTC (permalink / raw)


Sven Mascheck <mascheck at in-ulm.de> wrote:
 |On Wed, Apr 19, 2017 at 06:48:34AM +1000, 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?
 |> 
 |> Datum point: 2.9BSD's kernel can recognise #!, but the sh can't recognise \
 |> #.
 |
 |Dennis' email about #! to Berkeley is dated Jan 10 '80.
 |I've never seen any hint, how the bang in #! was chosen. Looks racy \
 |at least..
 |#! on BSDs was available as compile time option in 4.0BSD (~Oct '80?)
 |and default on 4.2BSD (~Sep '83).
 |BTW, AFAIK, the #! implementation in 2.8BSD (compile time option) is not
 |from research but seems to come from U.S. Geological Survey, Menlo Park.
 |
 |The BSD csh hack in sh&csh (# special as first character in a file, \
 |service.c),
 |came with 3BSD, also in '80.
 |
 |I found # as comment character in the BSD-sh first in CSRG 4.1.snap
 |(~Apr '81, word.c). And at Bell Labs, as mentioned, it came with SysIII, \
 |also ~81.
 |BTW, 4.3BSD ('86), and thus 2.10 BSD, brought an interesting change:
 |# is only recognized in non-interactive mode. In interactive mode
 |you actually get this:
 |  $ # echo x
 |  #: not found
 |This was not changed in 4BSD until sh was replaced by ash in 4.3 Net/2.

Hmm.  Kurt Shoens added # as a null() saying "The do nothing
command for comments." before that (2BSD, file copyright 1979).

--steffen


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 20:48 Warren Toomey
  2017-04-18 20:51 ` Ron Natalie
  2017-04-18 20:56 ` Chet Ramey
@ 2017-04-19 21:02 ` Sven Mascheck
  2017-04-19 22:07   ` Steffen Nurpmeso
  2 siblings, 1 reply; 38+ messages in thread
From: Sven Mascheck @ 2017-04-19 21:02 UTC (permalink / raw)


On Wed, Apr 19, 2017 at 06:48:34AM +1000, 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?
> 
> Datum point: 2.9BSD's kernel can recognise #!, but the sh can't recognise #.

Dennis' email about #! to Berkeley is dated Jan 10 '80.
I've never seen any hint, how the bang in #! was chosen. Looks racy at least..
#! on BSDs was available as compile time option in 4.0BSD (~Oct '80?)
and default on 4.2BSD (~Sep '83).
BTW, AFAIK, the #! implementation in 2.8BSD (compile time option) is not
from research but seems to come from U.S. Geological Survey, Menlo Park.

The BSD csh hack in sh&csh (# special as first character in a file, service.c),
came with 3BSD, also in '80.

I found # as comment character in the BSD-sh first in CSRG 4.1.snap
(~Apr '81, word.c). And at Bell Labs, as mentioned, it came with SysIII, also ~81.
BTW, 4.3BSD ('86), and thus 2.10 BSD, brought an interesting change:
# is only recognized in non-interactive mode. In interactive mode
you actually get this:
  $ # echo x
  #: not found
This was not changed in 4BSD until sh was replaced by ash in 4.3 Net/2.

Sven
-- 
https://www.in-ulm.de/~mascheck/bourne/
https://www.in-ulm.de/~mascheck/various/shebang/


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19 18:36     ` Stephen Kitt
@ 2017-04-19 20:35       ` Arthur Krewat
  0 siblings, 0 replies; 38+ messages in thread
From: Arthur Krewat @ 2017-04-19 20:35 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1968 bytes --]

This is all very interesting. Back when I was in high school, I 
exploited a daemon on the PDP-10 we used. MIC. It allowed you to 
basically run a "shell script" using a PTY as yourself, and it would 
generate a log, and you could peruse it at your leisure. The exploit had 
to do with the fact that PTYs had special privileges because of some 
custom security alterations  the consulting firm made to TOPS-10.

After the consulting firm got wind of what I did, they asked me to write 
a replacement that was more secure. While the original MIC had a lot of 
functionality in it, including labels like GOTHERE: (not the trailing 
colon), and it was used to compile the monitor (TOPS-10), they just 
needed something quick-and-dirty that students could use that wouldn't 
open up a security hole. I basically just forced the script into the 
terminals input buffer and let the monitor execute it line-by-line, 
instead of using a PTY.

So while I was creating this new MIC, I figured why not put the colon at 
the beginning of the line, it was easier to find on-the-fly.

Imagine my surprise when I got into DOS a year or two later and they 
used leading colons for labels in batch files.

Not having any access whatsoever to any flavor of UNIX at the time, this 
is the first I've heard that leading colons were used for labels outside 
of DOS and my MIC-lite :)



On 4/19/2017 2:36 PM, Stephen Kitt wrote:
> On Tue, 18 Apr 2017 15:45:36 -0600, Grant Taylor <gtaylor at tnetconsulting.net>
> wrote:
>> On 04/18/2017 02:51 PM, Ron Natalie wrote:
>>> Was also the label for goto.
>> Does that mean that the (so called) comment was really an (unused) label?
> Not Unix, but on DOS (on PCs) this was a common trick — it was especially
> appreciated because : as a comment prefix (often doubled, so it couldn’t be
> mistaken for a goto label) was faster to process than the official REM (which
> was a command which had to be executed).
>
> Regards,
>
> Stephen
>
>



^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 21:45   ` Grant Taylor
  2017-04-18 22:16     ` Ron Natalie
@ 2017-04-19 18:36     ` Stephen Kitt
  2017-04-19 20:35       ` Arthur Krewat
  1 sibling, 1 reply; 38+ messages in thread
From: Stephen Kitt @ 2017-04-19 18:36 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

On Tue, 18 Apr 2017 15:45:36 -0600, Grant Taylor <gtaylor at tnetconsulting.net>
wrote:
> On 04/18/2017 02:51 PM, Ron Natalie wrote:
> > Was also the label for goto.  
> 
> Does that mean that the (so called) comment was really an (unused) label?

Not Unix, but on DOS (on PCs) this was a common trick — it was especially
appreciated because : as a comment prefix (often doubled, so it couldn’t be
mistaken for a goto label) was faster to process than the official REM (which
was a command which had to be executed).

Regards,

Stephen


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19 17:36       ` Bakul Shah
@ 2017-04-19 17:59         ` Grant Taylor
  0 siblings, 0 replies; 38+ messages in thread
From: Grant Taylor @ 2017-04-19 17:59 UTC (permalink / raw)


On 04/19/2017 11:36 AM, Bakul Shah wrote:
> To see the difference try this:
>
> # echo one; echo two
> : echo one; echo two

*nod*

> You can select the whole line starting with : and have the
> command re-excute.

Ah.  That's contrary to why I use '#'.

I specifically want the command line to not be re-executed.

I purposefully select the portion of the command line that I want, 
paste, and execute.

> This is more useful in rc since it doesn't
> store history or have ^n/^p etc bound to scrolling through
> history.

This makes perfect sense in the use case you describe.

Thank you for the explanation.



-- 
Grant. . . .
unix || die

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3717 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170419/6609dc0f/attachment.bin>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19 16:31     ` Grant Taylor
  2017-04-19 16:59       ` Andreas Kusalananda Kähäri
@ 2017-04-19 17:36       ` Bakul Shah
  2017-04-19 17:59         ` Grant Taylor
  1 sibling, 1 reply; 38+ messages in thread
From: Bakul Shah @ 2017-04-19 17:36 UTC (permalink / raw)


On Wed, 19 Apr 2017 10:31:53 MDT Grant Taylor <gtaylor at tnetconsulting.net> wrote:
> I think you're effectively doing the same thing that I'm doing by having
> 
> my prompt start with '#', thus turning copy & paste ""errors into
> pasting comments.  Just a difference of a '#' comment character and a
> ':' label.
> 
> I see little difference between ':' and '#' in this case.
> 
> Please help me understand if I'm wrong.

To see the difference try this:

# echo one; echo two
: echo one; echo two

You can select the whole line starting with : and have the
command re-excute.  This is more useful in rc since it doesn't
store history or have ^n/^p etc bound to scrolling through
history.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19 16:31     ` Grant Taylor
@ 2017-04-19 16:59       ` Andreas Kusalananda Kähäri
  2017-04-19 17:36       ` Bakul Shah
  1 sibling, 0 replies; 38+ messages in thread
From: Andreas Kusalananda Kähäri @ 2017-04-19 16:59 UTC (permalink / raw)


On Wed, Apr 19, 2017 at 10:31:53AM -0600, Grant Taylor wrote:
> On 04/18/2017 06:50 PM, Lyndon Nerenberg wrote:
> > What's cool about ':' vs. '#' is:
> ...
> > Stick that in your .env and you get a snarf-and-barf'able shell
> > prompt that evals as a noop.  Blatantly ripped off from plan9port
> > IIRC.  I run this across all manner of *BSD and Solaris and Linux and
> > it just works.
> 
> I think you're effectively doing the same thing that I'm doing by having my
> prompt start with '#', thus turning copy & paste ""errors into pasting
> comments.  Just a difference of a '#' comment character and a ':' label.

Ah, thanks for explaining "snarf-and-barf"... I did a fast forward at
that point.  Sorry Lyndon...

Is this a reason why "#" was chosen as the root prompt, by the way?
POSIX mentions that "a sufficiently powerful user should be reminded of
that power by having an alternate prompt" but says little else...



> 
> I see little difference between ':' and '#' in this case.
> 
> Please help me understand if I'm wrong.
> 
> 
> 
> -- 
> Grant. . . .
> unix || die
> 




^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19  0:50   ` Lyndon Nerenberg
  2017-04-19  8:35     ` Andreas Kusalananda Kähäri
@ 2017-04-19 16:31     ` Grant Taylor
  2017-04-19 16:59       ` Andreas Kusalananda Kähäri
  2017-04-19 17:36       ` Bakul Shah
  1 sibling, 2 replies; 38+ messages in thread
From: Grant Taylor @ 2017-04-19 16:31 UTC (permalink / raw)


On 04/18/2017 06:50 PM, Lyndon Nerenberg wrote:
> What's cool about ':' vs. '#' is:
...
> Stick that in your .env and you get a snarf-and-barf'able shell
> prompt that evals as a noop.  Blatantly ripped off from plan9port
> IIRC.  I run this across all manner of *BSD and Solaris and Linux and
> it just works.

I think you're effectively doing the same thing that I'm doing by having 
my prompt start with '#', thus turning copy & paste ""errors into 
pasting comments.  Just a difference of a '#' comment character and a 
':' label.

I see little difference between ':' and '#' in this case.

Please help me understand if I'm wrong.



-- 
Grant. . . .
unix || die

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3717 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170419/321b287c/attachment.bin>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-19  0:50   ` Lyndon Nerenberg
@ 2017-04-19  8:35     ` Andreas Kusalananda Kähäri
  2017-04-19 16:31     ` Grant Taylor
  1 sibling, 0 replies; 38+ messages in thread
From: Andreas Kusalananda Kähäri @ 2017-04-19  8:35 UTC (permalink / raw)


On Tue, Apr 18, 2017 at 05:50:05PM -0700, Lyndon Nerenberg wrote:
> > Ron said:
> 
> > I still remember using : for a comment in the V6 shell.   Was also the label
> > for goto.
> 
> What's cool about ':' vs. '#' is:
> 
> -----8<-----8<-----8<-----8<-----8<-----8<-----
> 
> function cd {
>         command cd "$@" && setprompt
> }
> 
> function setprompt {
>         PS1=": "`id -un`@`hostname|sed 's;\..*$;;'`:'${PWD}; '; export PS1
> }
> 
> setprompt
> 
> -----8<-----8<-----8<-----8<-----8<-----8<-----
> 
> Stick that in your .env and you get a snarf-and-barf'able shell prompt that evals as a noop.  Blatantly ripped off from plan9port IIRC.  I run this across all manner of *BSD and Solaris and Linux and it just works.
> 
> --lyndon
> 
> 

I don't want to get into an argument in an off-topic sub-thread, but PS1
doesn't need to be exported, and since the shell evaluates the string,
you may as well use

LOGNAME=$(id -un)       # should already be set
HOSTNAME=$(hostname -s) # -s is fairly portable (not on Solaris tho)
PS1=': $LOGNAME@$HOSTNAME: $PWD; '

This saves having to execute id and hostname on every new prompt.

Also note that this has nothing to do with the : command.

Cheers


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 20:51 ` Ron Natalie
  2017-04-18 21:45   ` Grant Taylor
@ 2017-04-19  0:50   ` Lyndon Nerenberg
  2017-04-19  8:35     ` Andreas Kusalananda Kähäri
  2017-04-19 16:31     ` Grant Taylor
  2017-04-20 20:13   ` Clem Cole
  2 siblings, 2 replies; 38+ messages in thread
From: Lyndon Nerenberg @ 2017-04-19  0:50 UTC (permalink / raw)


> Ron said:

> I still remember using : for a comment in the V6 shell.   Was also the label
> for goto.

What's cool about ':' vs. '#' is:

-----8<-----8<-----8<-----8<-----8<-----8<-----

function cd {
        command cd "$@" && setprompt
}

function setprompt {
        PS1=": "`id -un`@`hostname|sed 's;\..*$;;'`:'${PWD}; '; export PS1
}

setprompt

-----8<-----8<-----8<-----8<-----8<-----8<-----

Stick that in your .env and you get a snarf-and-barf'able shell prompt that evals as a noop.  Blatantly ripped off from plan9port IIRC.  I run this across all manner of *BSD and Solaris and Linux and it just works.

--lyndon



^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 22:16     ` Ron Natalie
@ 2017-04-18 22:40       ` Toby Thain
  0 siblings, 0 replies; 38+ messages in thread
From: Toby Thain @ 2017-04-18 22:40 UTC (permalink / raw)


On 2017-04-18 6:16 PM, Ron Natalie wrote:
> Yep, served both purposes.

Hacker parsimony!

>
>
> -----Original Message-----
> From: TUHS [mailto:tuhs-bounces at minnie.tuhs.org] On Behalf Of Grant Taylor
> Sent: Tuesday, April 18, 2017 5:46 PM
> To: tuhs at minnie.tuhs.org
> Subject: Re: [TUHS] Bourne shell and comments
>
> On 04/18/2017 02:51 PM, Ron Natalie wrote:
>> Was also the label for goto.
>
> Does that mean that the (so called) comment was really an (unused) label?
>
>
>



^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 21:45   ` Grant Taylor
@ 2017-04-18 22:16     ` Ron Natalie
  2017-04-18 22:40       ` Toby Thain
  2017-04-19 18:36     ` Stephen Kitt
  1 sibling, 1 reply; 38+ messages in thread
From: Ron Natalie @ 2017-04-18 22:16 UTC (permalink / raw)


Yep, served both purposes.


-----Original Message-----
From: TUHS [mailto:tuhs-bounces@minnie.tuhs.org] On Behalf Of Grant Taylor
Sent: Tuesday, April 18, 2017 5:46 PM
To: tuhs at minnie.tuhs.org
Subject: Re: [TUHS] Bourne shell and comments

On 04/18/2017 02:51 PM, Ron Natalie wrote:
> Was also the label for goto.

Does that mean that the (so called) comment was really an (unused) label?



-- 
Grant. . . .
unix || die




^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 20:51 ` Ron Natalie
@ 2017-04-18 21:45   ` Grant Taylor
  2017-04-18 22:16     ` Ron Natalie
  2017-04-19 18:36     ` Stephen Kitt
  2017-04-19  0:50   ` Lyndon Nerenberg
  2017-04-20 20:13   ` Clem Cole
  2 siblings, 2 replies; 38+ messages in thread
From: Grant Taylor @ 2017-04-18 21:45 UTC (permalink / raw)


On 04/18/2017 02:51 PM, Ron Natalie wrote:
> Was also the label for goto.

Does that mean that the (so called) comment was really an (unused) label?



-- 
Grant. . . .
unix || die

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3717 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170418/5f550e3e/attachment.bin>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 20:48 Warren Toomey
  2017-04-18 20:51 ` Ron Natalie
@ 2017-04-18 20:56 ` Chet Ramey
  2017-04-19 21:02 ` Sven Mascheck
  2 siblings, 0 replies; 38+ messages in thread
From: Chet Ramey @ 2017-04-18 20:56 UTC (permalink / raw)


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/


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
  2017-04-18 20:48 Warren Toomey
@ 2017-04-18 20:51 ` Ron Natalie
  2017-04-18 21:45   ` Grant Taylor
                     ` (2 more replies)
  2017-04-18 20:56 ` Chet Ramey
  2017-04-19 21:02 ` Sven Mascheck
  2 siblings, 3 replies; 38+ messages in thread
From: Ron Natalie @ 2017-04-18 20:51 UTC (permalink / raw)


I believe the Berkeley #! magic number came first.   The C Shell already
used this as a comment, the Bourne shells grudgingly followed.

I still remember using : for a comment in the V6 shell.   Was also the label
for goto.




^ permalink raw reply	[flat|nested] 38+ messages in thread

* [TUHS] Bourne shell and comments
@ 2017-04-18 20:48 Warren Toomey
  2017-04-18 20:51 ` Ron Natalie
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Warren Toomey @ 2017-04-18 20:48 UTC (permalink / raw)


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?

Datum point: 2.9BSD's kernel can recognise #!, but the sh can't recognise #.

Cheers, Warren


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2017-04-22  2:46 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 19:18 [TUHS] Bourne shell and comments Doug McIlroy
  -- strict thread matches above, loose matches on Subject: below --
2017-04-21 17:03 Doug McIlroy
2017-04-21 18:15 ` Clem Cole
2017-04-21 19:13   ` Steve Johnson
2017-04-18 20:48 Warren Toomey
2017-04-18 20:51 ` Ron Natalie
2017-04-18 21:45   ` Grant Taylor
2017-04-18 22:16     ` Ron Natalie
2017-04-18 22:40       ` Toby Thain
2017-04-19 18:36     ` Stephen Kitt
2017-04-19 20:35       ` Arthur Krewat
2017-04-19  0:50   ` Lyndon Nerenberg
2017-04-19  8:35     ` Andreas Kusalananda Kähäri
2017-04-19 16:31     ` Grant Taylor
2017-04-19 16:59       ` Andreas Kusalananda Kähäri
2017-04-19 17:36       ` Bakul Shah
2017-04-19 17:59         ` Grant Taylor
2017-04-20 20:13   ` Clem Cole
2017-04-20 20:17     ` Chet Ramey
2017-04-21  3:28     ` arnold
2017-04-21  3:43       ` Bakul Shah
2017-04-21  6:07         ` Steve Nickolas
2017-04-21 11:18       ` Clem cole
2017-04-21 13:20       ` Michael Kjörling
2017-04-18 20:56 ` Chet Ramey
2017-04-19 21:02 ` Sven Mascheck
2017-04-19 22:07   ` Steffen Nurpmeso
2017-04-20  0:31     ` shawn wilson
2017-04-20  0:35       ` shawn wilson
2017-04-20  3:50         ` Andy Kosela
2017-04-20  4:47           ` Warner Losh
2017-04-21  1:42             ` Nemo
2017-04-21 10:54               ` Ron Natalie
2017-04-21 14:22                 ` Andy Kosela
2017-04-21 14:45                   ` Ron Natalie
2017-04-22  2:46           ` Dave Horsfall
2017-04-20 16:39     ` Sven Mascheck
2017-04-20 21:42       ` Steffen Nurpmeso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).