[TUHS] BSD mail(1) line addressing
meillo at marmaro.de
Mon Sep 12 19:02:19 AEST 2016
[2016-09-11 20:43] stanley lieber <sl at stanleylieber.com>
> Anyone know what considerations informed the decision (way back when) to eschew
> ed-like line addressing and switch to the currently entrenched, reversed form?
> V8 mail:
> 1,5p # prints messages one through five
> BSD mail:
> p1-5 # prints messages one through five
Maybe there was an influence from MH, where it would be written:
This snippet from FreeBSD's manpage for mail(1) could have been
part of some MH documentation as well:
Commands such as print and delete can be given a list of message numbers
as arguments to apply to a number of messages at once. Thus ``delete 1
2'' deletes messages 1 and 2, while ``delete 1-5'' deletes messages 1
through 5. [...]
MH was created at RAND Corporation in 1977/78. In the early eighties,
the University of California at Irvine took over the development.
But as BSD Mail was created already in 1978, it doesn't sound too
Maybe someone else can provide better information than my guessing.
In our development of mmh (a modern version of MH) we currently happen
to feel limited with the ``1-5'' specification, because it hinders us
doing calculations as the ed-like ``1,20-4'' (from one to twenty minus
four). Or more real-life-oriented with symbolic names: ``l-2'' -- the
second to last message. As the minus sign is already taken for ranges,
we have to invent some new syntax or break compatibility or rely on
guessing what seems to have been meant. The MH guys would better have
done it the ed way, back then!
More information about the TUHS