Hi! Issue 8 Draft 2.1 XCU, nl, STDOUT says:
101057 STDOUT
101058 The standard output shall be a text file in the following format:
101059 "%s%s%s", <line number>, <separator>, <input line>
101060 where <line number> is one of the following numeric formats:
101061 %6d When the rn format is used (the default; see −n).
101062 %06d When the rz format is used.
101063 %−6d When the ln format is used.
101064 <empty> When line numbers are suppressed for a portion of the page;
the <separator> is also
101065 suppressed.
101066 In the preceding list, the number 6 is the default width; the −w option
can change this value.
Now compare this to output from real implementations (these all match,
I've tried three coreutilses, NetBSD, and the illumos one, which is so
unchanged since SysV it still wants option-arguments welded to flags):
$ printf '%s\n' a q b | nl -bpq -nrz | cat -tve
a$
000001^Iq$
b$
$ printf '%s\n' a q b | nl -bpq -nrz -sabc | cat -tve
a$
000001abcq$
b$
$ printf '%s\n' a q b | nl -bpq -nrz -sąę
a
000001ąęq
b
I.e.:
%6s, "" When line numbers are suppressed for a portion of the page.
When line numbers are suppressed for a portion of the page,
the <separator> is additionally replaced with a string consisting of
<space>s with the same byte length as the <separator>.
Best,
наб
signature.asc
Description: PGP signature
