The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: ralph@inputplus.co.uk (Ralph Corderoy)
Subject: [TUHS] ed(1) and Pipes.
Date: Wed, 15 Nov 2017 12:36:30 +0000	[thread overview]
Message-ID: <20171115123630.159F51F978@orac.inputplus.co.uk> (raw)

Hi,

ed(1) pre-dates pipes.  When pipes came along, stderr was needed, and
lots of new idioms were found to make use of them.  Why didn't ed gain a
`filter' command to accompany `r !foo' and `w !bar'?

To sort this paragraph, I

    ;/^$/w !sort >t
    ;/^$/d
    -r t

I'd have thought that filtering was common enough to suggest a `^'
command with an implied `!'?  (Not `|' since that was uncommon then.)

ex(1) has `!' that filters if applied to a range of lines, and this
carries through to vi's `!' that's often heavily used, especially when
the "file" is just a scratch buffer of commands, input, and output.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy


             reply	other threads:[~2017-11-15 12:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 12:36 Ralph Corderoy [this message]
2017-11-15 22:16 Norman Wilson
2017-11-18 16:09 ` Ralph Corderoy

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=20171115123630.159F51F978@orac.inputplus.co.uk \
    --to=ralph@inputplus.co.uk \
    /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).