From: Warner Losh <imp@bsdimp.com>
To: Dave Horsfall <dave@horsfall.org>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] # (was Re: sh: cmd | >file)
Date: Mon, 6 Jan 2020 17:39:39 -0700 [thread overview]
Message-ID: <CANCZdfqsBFwxwjb5kEnE6FTGgAA4ZH_L_AqyB4A1eoUeEoL1Gg@mail.gmail.com> (raw)
In-Reply-To: <alpine.BSF.2.21.9999.2001070936580.40155@aneurin.horsfall.org>
[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]
On Mon, Jan 6, 2020 at 3:51 PM Dave Horsfall <dave@horsfall.org> wrote:
> 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
>
Or you might have cut and paste the commands from a script to test
something, or to redo something by hand that failed for some reason.
Warner
> [...]
>
> > 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
>
[-- Attachment #2: Type: text/html, Size: 1675 bytes --]
next prev parent reply other threads:[~2020-01-07 0:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 6:30 Brian Walden
2020-01-06 22:50 ` Dave Horsfall
2020-01-07 0:39 ` Warner Losh [this message]
2020-01-08 2:44 ` Greg A. Woods
2020-01-07 15:24 ` Clem Cole
2020-01-07 22:13 ` Dave Horsfall
2020-01-07 22:26 ` Bakul Shah
2020-01-07 22:56 ` Dave Horsfall
2020-01-08 5:20 Brian Walden
2020-01-08 6:25 ` Bakul Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANCZdfqsBFwxwjb5kEnE6FTGgAA4ZH_L_AqyB4A1eoUeEoL1Gg@mail.gmail.com \
--to=imp@bsdimp.com \
--cc=dave@horsfall.org \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).