The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: doug@cs.dartmouth.edu (Doug McIlroy)
Subject: [TUHS] Unix taste
Date: Thu, 07 Aug 2014 22:12:55 -0400	[thread overview]
Message-ID: <201408080212.s782CtwK007175@coolidge.cs.dartmouth.edu> (raw)

Thanks, Norman, for reminding me of the actual pipe syntax in v3.
This reinforces the title of one history item on Dennis's
website: "Why Ken had to invent |".

I'd suppressed all memory of the fact that in the pipeline
        ... > cmd > ...
cmd had to be a single token. That was certainly not the intent
of my original proposal. It is understandable, though, as a
minimal hack to the existing shell syntax and its parser, which
accepted occurrences of <token and >token anywhere in a command.

The single-token rule meant that, if you wanted to supply an
option to wc in the pipeline
        ls > wc >
you couldn't write
        ls > wc -l >
as one would expect, but instead had to write
        ls > "wc -l" >
Yet a quoted "wc -l" as a bare command or (I suspect) as the
first command in a pipeline would lead to "command not found".
What a mess!

Soon after, Ken was inspired to invent the | operator, lest
he should have to describe an ugly duckling in public at an
upcoming symposium in London.

Is it possible that the ugliness of the token hack was the
precipitating factor that gave us the sublime | ?  But for
the hack, perhaps we'd still be writing
        ls > wc >

Doug



             reply	other threads:[~2014-08-08  2:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08  2:12 Doug McIlroy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-14  4:34 Norman Wilson
2014-08-14  4:49 ` A. P. Garcia
2014-08-08  3:27 Noel Chiappa
2014-08-02 16:07 Ed
2014-08-02 15:38 Doug McIlroy
2014-08-02 16:07 ` John Cowan

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=201408080212.s782CtwK007175@coolidge.cs.dartmouth.edu \
    --to=doug@cs.dartmouth.edu \
    /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).