[TUHS] ed: multiple addresses (with semicolons)

markus schnalke meillo at marmaro.de
Tue Jul 12 00:40:45 AEST 2022


thanks to everyone helping me with links.

As you already mentioned:

[2022-07-08 23:36] Douglas McIlroy <douglas.mcilroy at dartmouth.edu>
> Neither tells about extra address fields or semicolons

The best I could find was this paper by DMR:


There he writes:

	Sequences of two or more addresses are separated either by "," or
	by ";". In the latter case "." is set to the preceding address
	before the succeeding address is evaluated. The semicolon is used
	mostly to control the starting line for context searches. 

Later in the bootstrapping explanation appears a command with an
address chain:

	O;/./;.mf	"move filename (if there) to bf

I couldn't really understand this stuff. It seems to be specific to
this version of qed and the underlying operating system. Nevermind,
this leaves my focus of interest.

More was I curious about the documentation of address chains in

- ``The Unix Programming Environment'' does neither mention
address chains nor semicolon separators.

- SRB's ``The Unix System'' (an often overlooked but great book)
explains the semicolon separator in a one-paragraph section on page

- ``Software Tools'' goes into the most detail that I could find.
On pages 170 f. (section 6.2) it explains the semicolon separator
and address chains with this example:


	prints from the third succeeding line containing # to the
	fourth, inclusive.

Right thereafter (pages 172 and 173; section 6.3) the
implementation of getlist() -- collect line numbers -- follows,
which, as expected, is in a similar style as the actual
implementation in Unix at that time (v6):
	See function commands()


More information about the TUHS mailing list