The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: segaloco via TUHS <tuhs@tuhs.org>
To: markus schnalke <meillo@marmaro.de>
Cc: tuhs@tuhs.org
Subject: [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
Date: Sat, 23 Jul 2022 07:55:59 +0000	[thread overview]
Message-ID: <8NgHeeJiYEBE0zhtd9RdKIeYWcAwtxsnAj7YhVIvLpz-yt0__LeFvVzNNGgSNTeDGnVQy-qxkoHWvmRi84ybYyNAiMRDJuVoAaEG96UAu4s=@protonmail.com> (raw)
In-Reply-To: <1oF87S-4zW-00@marmaro.de>

> On Friday, July 22nd, 2022 at 10:56 PM, markus schnalke <meillo@marmaro.de> wrote:
>
> As I'm currently thinking a lot about ed, this comes to mind:
>
> echo 23,42n | ed - file

The n rule is actually what lead me to studying nl.  It's also supported in System III but not V7, although ed's n does show up in V8-V10.  The implementation looks similar although integrated slightly differently.  Probably from the same source though.

There's also an implementation in 4.4BSD-Lite, although plan old 4.4 with the AT&T encumbered ed doesn't implement n.

So a rough timeline I can see for line number filters based on source code, old docs, etc:

1977 - num and ex's '#' commands are introduced for 2BSD release
1980 - nl and ed's 'n' commands are introduced in System III
1980 - num's trail goes dark between 4 and 4.1c BSD
1982 - System V adopts ex, including '#'
1985 - Research has adopted ed with n by now as well as ex, never adopts nl
1992 - POSIX.2 is released, codifying nl, ed with n, and ex with #
1992 - nl appears in GNU fileutils
1994 - 4.4BSD-Lite ed includes n
1999 - NetBSD 1.4 adds nl
2002 - FreeBSD 4.5 adds nl
2005 - MacOSX 10.4 with text_cmds-47 adds nl
2013 - MINIX 3.2.1 adopts NetBSD nl
2014 - OpenBSD 5.5 adds nl

So all in all, num was an attempt that petered out, but # stayed in ex.  System III and 4.4BSD-Lite ed derivatives implement n, and nl was introduced in System III for the AT&T line and slowly cropped up elsewhere.  System V picked up ex in 1982, allowing nl, ed with n, and ex with # in the AT&T line.  GNU had one out of the gate when POSIX hit.  BSDs were late to the party with regards to both ed with n as well as nl, with nl only being adopted after the last Berkeley releases and subsequent fracturing.

So thus far it seems the earliest line numberer to see wide use was probably ex's #.  System III's nl became the ubiquitous tool for the job and was then slowly adopted elsewhere.  Ed rides a fine middle ground with the n command that saw wider adoption earlier.  I still have to wonder if there was something earlier though.

- Matt

  reply	other threads:[~2022-07-23  7:56 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23  2:57 [TUHS] " segaloco via TUHS
2022-07-23  5:56 ` [TUHS] " markus schnalke
2022-07-23  7:55   ` segaloco via TUHS [this message]
2022-07-23 11:01     ` Dan Cross
2022-07-23 11:20       ` John Cowan
2022-07-23 12:00         ` Dan Cross
2022-07-23 12:49           ` Norman Wilson
2022-07-23 13:20             ` Rob Pike
2022-07-23 13:36               ` Ralph Corderoy
2022-07-23 14:33               ` John Cowan
2022-07-24 19:45               ` Warner Losh
2022-07-24 20:33                 ` segaloco via TUHS
2022-07-24 21:04                   ` Warner Losh
2022-07-23 17:35             ` Clem Cole
2022-07-23 18:40               ` Phil Budne
2022-07-23 18:51                 ` Nelson H. F. Beebe
2022-07-23 19:07                   ` Douglas McIlroy
2022-07-24 19:02           ` Tomasz Rola
2022-07-28  0:30             ` Tomasz Rola
2022-07-28  1:03               ` Phil Budne
2022-07-28  4:13                 ` [TUHS] SNOBOL and RATSNO William H. Mitchell
2022-07-29  4:28                   ` [TUHS] " Dave Horsfall
2022-07-29  5:07                   ` Tomasz Rola
2022-08-09  5:12                     ` Jonathan Gevaryahu
2022-08-09  6:11                       ` Rob Pike
2022-08-09 13:34                         ` Clem Cole
2022-08-09 15:15                           ` Andrew Hume
2022-08-09 18:26                             ` Clem Cole
2022-08-09 18:52                             ` Tom Teixeira
2022-08-09 21:25                             ` Rob Pike
2022-08-09 15:39                           ` Richard Salz
2022-08-09 13:56                         ` Larry McVoy
2022-08-09 16:45                         ` William H. Mitchell
2022-07-29  0:22                 ` [TUHS] SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?] Stuff Received
2022-07-29  5:01                   ` [TUHS] " Charles H. Sauer
2022-07-29 14:07                     ` John Cowan
2022-07-29 15:37                   ` Dave Plonka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='8NgHeeJiYEBE0zhtd9RdKIeYWcAwtxsnAj7YhVIvLpz-yt0__LeFvVzNNGgSNTeDGnVQy-qxkoHWvmRi84ybYyNAiMRDJuVoAaEG96UAu4s=@protonmail.com' \
    --to=tuhs@tuhs.org \
    --cc=meillo@marmaro.de \
    --cc=segaloco@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).