[TUHS] Line Numbers Before SysIII nl? BSD num?
John Cowan
cowan at ccil.org
Sat Jul 23 21:20:40 AEST 2022
On Sat, Jul 23, 2022 at 7:03 AM Dan Cross <crossd at gmail.com> wrote:
> It may be worth noting that BSD had `cat -n` in 4BSD by October, 1980:
> https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/man/man1/cat.1
>
> That may explain the relatively late incorporation of `nl` in, at least,
> the BSD lineage.
>
An obvious approach, which would leave no real traces in documentation,
would be:
$ awk '{print NR, $0}'
A more precise emulation would be more of a pain to type:
$ awk '{printf("%6d\t%s\n", NR, $0)}'
but perfectly usable in a script.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20220723/ede7593f/attachment-0001.htm>
More information about the TUHS
mailing list