[TUHS] Command line options and complexity

Doug McIlroy doug at cs.dartmouth.edu
Thu Mar 5 14:57:19 AEST 2020


> These go all the way back to v7 unix, where ls has an option to reverse
the sort order (which could have been done by passing the output to tac).

A cool idea, but tac was not in v7. And tail didn't get the -r
option until v8.

As for rev, I don't know why it was first written, but one
use was to examine suffixes--a kind of thing that several
word lovers in the Unix lab were prone to do.

Apropos of using rev to make rhyming dictionaries, Walker's
Rhyming Dictionary was published decades before Noah
Webster's dictionary appeared and stayed in print
for about 200 years. Notionally the relation between
webster and walker is
	rev <webster | sort | rev >walker

Doug


More information about the TUHS mailing list