[TUHS] # (was Re: sh: cmd | >file)

Dave Horsfall dave at horsfall.org
Tue Jan 7 08:50:33 AEST 2020


On Mon, 6 Jan 2020, Brian Walden wrote:

> csh(1) was wrtten around 1978 and yes # as a comment was only for 
> scrtipts, think it was why would you need to comment interactively?

Why would you *not* want to?  You've just made "#" asymmetric in its 
behaviour; in the meantime the parser just sees an unescaped "#" and 
ignores everything after that, without regard to context.

You might also be using "script" e.g.

     script
     blah blah
     # Now here I do something funky
     *really* funky stuff
     ^D

[...]

> Also before you say wait! ALGOL uses # as comment and is older than 
> Kernighan' ratfor(1). [...]

Funny; I recall ALGOL using "comment ... ;" or was that ALGOLW (which I 
loved using; I wish I still had my ALGOLW book)?

-- Dave


More information about the TUHS mailing list