The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: norman@oclsc.org (Norman Wilson)
Subject: [TUHS] Unix taste (Re:  terminal - just for fun)
Date: Wed,  6 Aug 2014 18:19:11 -0400 (EDT)	[thread overview]
Message-ID: <20140806221911.3437F1DE37E@lignose.oclsc.org> (raw)

Lyndon Nerenberg:

  Do you still consider '^' the shell's inter-command pipe character?

======

No.  By the time I first used UNIX, | was well-established as
the official pipeline character; ^ was just a quirky synonym.
I had the impression somehow that ^ was there just to make
life easier on the Model 33 Teletype, which had no | key.

Digging into old manuals, ^ and | appear simultaneously, in
sh(1) in the Fourth Edition.  Pipelines first appeared in
3/e, though with a clumsier syntax (not supported by
any current shell I know): where we would now type
	ls | wc
the original syntax was
	ls > wc >
The trailing > was required to tell the shell to make a pipeline
of the two commands, rather than to redirect output to a file
named wc.  One could of course redirect the final command's
output to a file as well:
	ls > wc > filecount

Even clumsier: where we would now type
	ls | pr -h 'Look at all these files!'
the 3/e shell expected
	ls > "pr -h 'Look at all these files!'" >
because its parser bound > to only the single following word.

The original syntax could be reversed too:
	wc < ls <
The manual implies this was required if the pipeline's
ultimate input came from a file.  Maybe someone with more
energy than I have right now can dig out the source code
and see.

I was originally going to use an example like
	who | grep 'r.*' | wc -l
but the old-style version would be anachronistic.  There
was no grep yet in 3/e, and wc took no arguments.
	
I do still have the habit of quoting ^ in command arguments,
but that's still necessary on a few current systems; e.g.
/bin/sh on Solaris 10.  Fortunately, that makes it easier
to remember to quote ! as well, something required by the
clumsy command-history mechanism some people like but I don't.
(I usually turn off history but occasionally it gets turned on
by accident anyway.)

Norman Wilson
Toronto ON



             reply	other threads:[~2014-08-06 22:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 22:19 Norman Wilson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-06 22:24 Norman Wilson
2014-08-04 20:21 Norman Wilson
2014-08-04 22:24 ` A. P. Garcia
2014-08-05  2:41   ` Andy Kosela
2014-08-05  3:32     ` Warner Losh
2014-08-04  2:54 Norman Wilson
2014-08-04  3:11 ` Lyndon Nerenberg
2014-08-04  7:04   ` Dave Horsfall
2014-08-04  9:12     ` Steve Nickolas
2014-08-03 16:48 Noel Chiappa
2014-08-03 17:09 ` John Cowan
2014-08-03 11:49 Noel Chiappa
2014-08-03 12:14 ` Steve Nickolas
2014-08-03 16:26 ` John Cowan
2014-08-04 13:59 ` Tim Bradshaw
2014-08-04 14:53   ` A. P. Garcia
2014-08-03  0:48 Noel Chiappa
2014-08-03  8:00 ` A. P. Garcia
2014-08-02 21:18 Noel Chiappa
2014-08-02 23:44 ` A. P. Garcia
2014-08-02 16:47 Noel Chiappa
2014-08-02 18:51 ` Ian King
2014-08-02 14:28 Doug McIlroy
2014-08-02 14:00 ` Larry McVoy
2014-08-02 15:51   ` Steve Nickolas
2014-08-02 16:07     ` John Cowan
2014-08-02 17:28     ` Benjamin Huntsman
2014-08-02 19:50     ` Dave Horsfall
2014-08-02 16:04 ` Diomidis Spinellis
2014-08-02 16:03   ` Larry McVoy
2014-08-02 19:36 ` Dave Horsfall

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=20140806221911.3437F1DE37E@lignose.oclsc.org \
    --to=norman@oclsc.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).