The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] nl section delimiters
@ 2024-05-10  6:15 David Arnold
  2024-05-10 10:08 ` [TUHS] " Rob Pike
  0 siblings, 1 reply; 7+ messages in thread
From: David Arnold @ 2024-05-10  6:15 UTC (permalink / raw)
  To: tuhs

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] Re: nl section delimiters
  2024-05-10  6:15 [TUHS] nl section delimiters David Arnold
@ 2024-05-10 10:08 ` Rob Pike
  2024-05-10 16:05   ` segaloco via TUHS
  2024-05-10 16:50   ` John P. Linderman
  0 siblings, 2 replies; 7+ messages in thread
From: Rob Pike @ 2024-05-10 10:08 UTC (permalink / raw)
  To: David Arnold; +Cc: tuhs

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

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
>

[-- Attachment #2: Type: text/html, Size: 2120 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] Re: nl section delimiters
  2024-05-10 10:08 ` [TUHS] " Rob Pike
@ 2024-05-10 16:05   ` segaloco via TUHS
  2024-05-10 16:50   ` John P. Linderman
  1 sibling, 0 replies; 7+ messages in thread
From: segaloco via TUHS @ 2024-05-10 16:05 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

On Friday, May 10th, 2024 at 3:08 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

https://www.tuhs.org/pipermail/tuhs/2022-July/026197.html

Here's an earlier thread on nl that doesn't answer your specific question on the sequences but may provide some background on nl(1).

- Matt G.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] Re: nl section delimiters
  2024-05-10 10:08 ` [TUHS] " Rob Pike
  2024-05-10 16:05   ` segaloco via TUHS
@ 2024-05-10 16:50   ` John P. Linderman
  2024-05-10 23:05     ` Steffen Nurpmeso
  2024-05-11  9:07     ` Ralph Corderoy
  1 sibling, 2 replies; 7+ messages in thread
From: John P. Linderman @ 2024-05-10 16:50 UTC (permalink / raw)
  To: Rob Pike; +Cc: tuhs

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

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
>>
>

[-- Attachment #2: Type: text/html, Size: 2827 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] Re: nl section delimiters
  2024-05-10 16:50   ` John P. Linderman
@ 2024-05-10 23:05     ` Steffen Nurpmeso
  2024-05-11  9:07     ` Ralph Corderoy
  1 sibling, 0 replies; 7+ messages in thread
From: Steffen Nurpmeso @ 2024-05-10 23:05 UTC (permalink / raw)
  To: John P. Linderman; +Cc: tuhs

John P. Linderman wrote in
 <CAC0cEp-E8f8nXaCMM34opqcgPQFpOQnE6Z9m3g1o4N_ET5-nsA@mail.gmail.com>:
 |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

But it misses the coolness of the empty true(1), and the last
possibly requires more CPU cycles for startup than you had on
a work day (said into the blue, completely unmathematically).

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] Re: nl section delimiters
  2024-05-10 16:50   ` John P. Linderman
  2024-05-10 23:05     ` Steffen Nurpmeso
@ 2024-05-11  9:07     ` Ralph Corderoy
  1 sibling, 0 replies; 7+ messages in thread
From: Ralph Corderoy @ 2024-05-11  9:07 UTC (permalink / raw)
  To: tuhs

Hi jpl,

> 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

pr(1) was in V5, where one of its stderr messages was ‘Very funny.’.
awk arrived in V7.

-- 
Cheers, Ralph.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] nl section delimiters
@ 2024-05-11  2:19 Douglas McIlroy
  0 siblings, 0 replies; 7+ messages in thread
From: Douglas McIlroy @ 2024-05-11  2:19 UTC (permalink / raw)
  To: TUHS main list

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

> But it misses the coolness of the empty true(1).

Too cool. With an empty true(1), execl("true", "true", 0) is out in the
cold.

Doug

[-- Attachment #2: Type: text/html, Size: 264 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-11  9:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-10  6:15 [TUHS] nl section delimiters David Arnold
2024-05-10 10:08 ` [TUHS] " Rob Pike
2024-05-10 16:05   ` segaloco via TUHS
2024-05-10 16:50   ` John P. Linderman
2024-05-10 23:05     ` Steffen Nurpmeso
2024-05-11  9:07     ` Ralph Corderoy
2024-05-11  2:19 [TUHS] " Douglas McIlroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).