tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [patch] cat -n bug from 33 years ago
> The attached patch fixes a bug in /bin/cat when using -n with
> multiple input files.
While someone's meddling with src/bin/cat....
The manpage language does support this, but it could be clearer; I'd
prefer to see an explicit statement added that the numbering continues
across multiple input files. As possible wording:
.It Fl n
Number the output lines, starting from 1. Note that it does not matter
whether the output lines come from multiple files or not.
Two other things occur to me, on reading the manpage:
-b is documented as not numbering `blank lines'. It is not clear from
the manpage whether this means "lines containing nothing at all" or
"lines containing nothing except possibly whitespace". The code does
the former; assuming that's what you want, I'd suggest s/blank/empty/.
-s is documented as "Squeeze multiple adjacent empty lines, causing the
output to be single spaced.". The part before the comma is fine, but
the part after seems wrong to me; `single spaced', to me, means `no
blank lines except between paragraphs', which is not what cat -s does.
Again, a possible wording:
.It Fl s
Squeeze multiple adjacent empty lines into a single empty line.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index