NL(1) DOMAIN/IX Reference Manual (SYS5) NL(1)
NAME
nl - line numbering filter
USAGE
nl [ -htype ] [ -btype ] [ -ftype ] [ -vstart# ] [ -iincr ]
[ -p ]
[ -lnum ] [ -ssep ] [ -wwidth ] [ -nformat ] [ -ddelim ]
file
DESCRIPTION
Nl reads lines from the named file (or the standard input if
no file is named) and reproduces the lines on the standard
output. Lines are numbered on the left according to the
command options in effect.
Nl views the text it reads in terms of logical pages. Line
numbering is reset at the start of each logical page. A
logical page consists of a header, a body, and a footer sec-
tion. Empty sections are valid. Different line-numbering
options are independently available for the header, body,
and footer (e.g., no numbering of header and footer lines
while numbering blank lines only in the body).
The start of logical page sections are signaled by input
lines containing nothing but the following delimiter
character(s):
Line contents Start of
\:\:\: header
\:\: body
\: footer
Unless optioned otherwise, nl assumes the text being read is
in a single logical page body. Command options may appear
in any order and may be intermingled with an optional
filename. Only one file at a time may be named.
OPTIONS
-btype Specify which logical page body lines are to be
numbered. Recognized types are as follows: a,
number all lines; t, number lines with printable
text only; n, number no lines; p string, number
only lines containing the regular expression
specified in string. The default type for the
logical page body is t (text lines numbered).
-htype Same as -btype except for the header. The default
type for the logical page header is n (no lines
numbered).
Printed 6/10/85 NL-1
NL(1) DOMAIN/IX Reference Manual (SYS5) NL(1)
-ftype Same as -btype except for the footer. The default
for the logical page footer is n (no lines num-
bered).
-p Do not restart numbering at logical page delim-
iters.
-vstart# Use start# as the initial value used for numbering
logical page lines. The default is one.
-iincr Use incr as the increment value for numbering log-
ical page lines. The default is one.
-ssep Use sep as the character(s) to separate the line
number and the corresponding text line. The
default separator is a tab.
-wwidth Use width as the number of characters to be used
for the line number. The default width is six.
-nformat Use format as the line-numbering format. The
recognized values are: ln, left justified, leading
zeros suppressed; rn, right justified, leading
zeros suppressed; rz, right justified, leading
zeros kept. The default format is rn (right jus-
tified).
-lnum Use num as the number of blank lines to be con-
sidered as one. For example, -l2 results in only
the second adjacent blank being numbered (if the
appropriate -ha, -ba, and/or -fa option is set).
The default is one.
-ddelim Change the delimiter characters specifying the
start of a logical page section from the default
characters (\:) to delim, which should be two
user-specified characters. If only one character
is entered, the second character remains the
default character (:). No space should appear
between the -d and the delimiter characters. To
enter a backslash, use two backslashes.
EXAMPLE
To number file1 starting at line number 10 with an increment
of 10, use the following command:
nl -v10 -i10 -d!+ file1
The logical page delimiters are !+.
RELATED INFORMATION
pr (1).
NL-2 Printed 6/10/85