Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (m - o) nl(1)
-n format
Species format as the line-numbering format. Recognized formats are:
ln Left justied, leading zeros are suppressed
rn Right justied, leading zeros are suppressed (the default value)
rz Right justied, leading zeros are kept
-p Ignores logical page delimiters (does not restart numbering).
-s[separator ]
Separates text from line numbers with the separator string. The default value of
separator is a tab character.
-v number
Sets the initial logical page line number to number. The default value of number is 1.
-w number
Species number as the number of digits in the line number. The default value of
number is 6.
DESCRIPTION
The nl command reads le (the standard input le by default), numbers the lines in the input, and
writes the numbered lines to the standard output le.
In the output, nl numbers the lines on the left, according to the ags you specify on the command
line.
The input text must be written in logical pages. Each logical page has a header, a body, and a
footer section (sections can be empty). Unless you use the -p ag, nl resets the line numbers at
the start of each logical page. You can set line-numbering ags independently for the header,
body, and footer sections (for example, no numbering of header and footer lines while numbering
text lines only in the body).
Signal the start of logical page sections with lines in le that contain nothing but the following
delimiter characters:
Line Contents Start of
\:\:\: Header
\:\: Body
\: Footer
If le contains none of these lines, then the entire le is considered the body.
You can name only one le on the command line. You can list the ags and the lename in any
order.
Unless otherwise specied, nl assumes the text being read is in a single logical page body.
EXAMPLES
1. To number only the nonblank lines in the le chap1,enter:
nl chap1
This displays a numbered listing of chap1, numbering only the nonblank lines in the
body sections by default. If chap1 contains no \:\:\:, \:\:,or\: delimiters, then the entire
le is considered the body.
527188-004 Hewlett-Packard Company 639