[TUHS] Remember the ed thread?

Norman Wilson norman at oclsc.org
Tue Mar 30 01:58:12 AEST 2021

ed is the standard editor, they say.

The b command (stands for browse) came from late-1970s
U of T; rob probably brought it to 1127.  There were a
handful of other syntactic conveniences, like being
allowed to leave off the final delimeter of an s command,
and declaring that a missing address means 1 before the
comma or semicolon and $ after, so
works over all lines from 3 to the last, and , standing
alone addresses the whole buffer.

Also the idea that s followed by a digit N means start
with the Nth instance of the pattern:
affects only the third fish, and
every fish after the second.

I have all those tweaks, plus a few others, embedded in
my fingers from the qed produced by the same Toronto
hacks.  I contracted it from the copy rob left behind
at Caltech, which means it has been my editor of choice
for 40 years now (with sam as an alternate favourite
since its inception 35 years or so ago).  That qed
has a lot of cryptic programming stuff that I have
mostly forgotten because it was never that useful, but
what really hooked me was
a.  Multiple buffers, with the ability to move and
copy text between them reasonably smoothly (both with
the m and t commands and with an interpolate-into-input
magic character);
b.  The > < | commands, which respectively send the
addressed lines to a shell command (default ,), replace
the addressed lines or append after the single addressed
line the standard output of the shell command (default .),
and replaced addressed lines with what you get by
sending them (default ,) to the shell command, replacing
them with its standard output.

The last operators make qed into a kind of workbench,
both for massaging data and for constructing a list
of commands to send to the shell.

I gather current Linux/BSD eds have > and <, spelled
r ! and w !, but without | it just ain't the same,
rather like the way | revolutionized the shell.

I believe the credit for U of T ed and qed go mainly
to Rob Pike, Tom Duff, Hugh Redelmeier, and the (alas
now late) David Tillbrook.  David remained an avid
user of qed, continuing to add stuff to it.

Norman Wilson
Toronto ON

PS: this message, as most of my e-mail, composed by
typing it into qed, editing as needed, then running
	>mail tuhs at tuhs.org

More information about the TUHS mailing list