I'll accept Rob's theory. Instead of taking the time to go through the alphabet soup of options to nl and pr and ls, learning a tool like awk or perl or python makes implementing most of what these commands do (or what you wish they could do) a one-finger exercise. -- jpl

On Fri, May 10, 2024 at 6:09 AM Rob Pike <robpike@gmail.com> wrote:
Didn't recognize the command, looked it up. Sigh.

  pr -tn <file>

seems sufficient for me, but then that raises the question of your question.

I've been developing a theory about how the existence of something leads to things being added to it that you didn't need at all and only thought of when the original thing was created. Bloat by example, if you will. I suspect it will not be a popular theory, however accurately it may describe the technological world.

-rob


On Fri, May 10, 2024 at 4:16 PM David Arnold <davida@pobox.com> wrote:
nl(1) uses the notable character sequences “\:\:\:”, “\:\:”, and “\:” to delimit header, body, and trailer sections within its input.

I wondered if anyone was able to shed light on the reason those were adopted as the defaults?

I would have expected perhaps something compatible with *roff (like, .\” something).

FreeBSD claims nl first appeared in System III (although it previously claimed SVR2), but I haven’t dug into the implementation any further.

Thanks in advance,



d