From: Ralph Corderoy <ralph@inputplus.co.uk>
To: tuhs@tuhs.org
Subject: [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
Date: Sat, 23 Jul 2022 14:36:56 +0100 [thread overview]
Message-ID: <20220723133656.E196821CB6@orac.inputplus.co.uk> (raw)
In-Reply-To: <CAKzdPgwTgbHG0Ux6oO=rKp9Rh0yx0Fo2UL=g7V8G=uw2zLLK0A@mail.gmail.com>
Hi Rob,
> Very odd. I thought so too, but the 8th Edition manual says pr -n
> prints in n columns, while the 9th and 10th say it numbers the lines.
8th Edition's pr.c has -n and -x which both turn on line numbers.
The optional argument gives the width used for the line number.
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/pr.c
case 'n':
case 'x': /* retained for historical reasons */
++Lnumb;
if ((Numw = intopt(argv, &Nsepc)) <= 0)
Numw = NUMW;
if (Lnumb && C != EOF && (colno == 0 || Multi == 'a')) {
if (Page >= Fpage) {
putspace();
printf("%*ld", Numw, Buffer ?
Colpts[colno].c_lno++ : Lnumb);
Outpos += Numw;
put(Nsepc);
}
++Lnumb;
}
I think -n and -x are undocumented in the matching man page.
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V8/usr/man/man1/pr.1
The -n you're referring to is an italic ‘n’, e.g. -3 for three columns.
.TP
.BI \- n
Produce
.IR n -column
output.
--
Cheers, Ralph.
next prev parent reply other threads:[~2022-07-23 13:37 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
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 [this message]
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=20220723133656.E196821CB6@orac.inputplus.co.uk \
--to=ralph@inputplus.co.uk \
--cc=tuhs@tuhs.org \
/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).