[TUHS] ed(1) and Pipes.
ralph at inputplus.co.uk
Wed Nov 15 22:36:30 AEST 2017
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
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.
More information about the TUHS