MPE/iX Shell and Utilities Reference Manual, Vol 2

nl(1) MPE/iX Shell and Utilities nl(1)
NAME
nl — number lines
SYNOPSIS
nl [–btype][–dxy][–ftype][–htype][–in][–ln][–nfmt][–p][–ssep]
[–v[n]] [–w[n]] [file]
DESCRIPTION
nl is a filter that numbers lines in a single file.Ifafile is not specified on the command line,
the standard input is used.
The input is viewed as a stream of text lines, possibly divided by separators into logical pages.
In turn, each page may consist of a header, body, and/or footer in that order. Any missing part
is assumed to be empty. Using the default page delimiter character of \ and :, lines consist-
ing entirely of the combinations shown in Table 1-8 are logical page part delimiters (and are
not numbered).
Input Line Starts
\:\:\: page header
\:\: page body
\: page footer
Table 1-8: nl Logical Page Delimiter Characters
There are numerous options to control the precise nature of the line numbering:
–btype Specifies the numbering type for each page body. The numbering type is one of:
a numbers all lines.
n does not number any lines.
pregexp
numbers only those lines which contain the basic regular expression regexp.
See regexp(3) for details.
t numbers only those lines that are not empty lines. An empty line is a line
consisting of only a newline character.
The default body numbering type is t.
–dxy Changes the default delimiter characters (\ and : mentioned earlier) to characters x
and y. If only x is specified, only the first delimiter character is changed.
–ftype Specifies the page footer numbering type (see the –b option). The default type is n.
Commands and Utilities 1-393