|NL(1)||General Commands Manual||NL(1)|
nl — line
nl utility reads lines from the named
file, applies a configurable line numbering filter
operation, and writes the result to the standard output. If
file is a single dash (‘-’) or absent,
nl reads from the standard input.
nl utility treats the text it reads in
terms of logical pages. Unless specified otherwise, line numbering is reset
at the start of each logical page. A logical page consists of a header, a
body and a footer section; empty sections are valid. Different line
numbering options are independently available for header, body and footer
The starts of logical page sections are signaled by input lines containing nothing but one of the following sequences of delimiter characters:
If the input does not contain any logical page section signaling directives, the text being read is assumed to consist of a single logical page body.
The following options are available:
The default type for logical page body lines is t.
-btype except for logical page footer lines. The default type for logical page footer lines is n.
-btype except for logical page header lines. The default type for logical page header lines is n.
-ha option, specify the number of adjacent blank lines to be considered as one. For example,
-l2 results in only the second adjacent blank line being numbered. The default num value is 1.
The default format is rn.
-poption. The default startnum value is 1.
nl utility exits 0 on success,
and >0 if an error occurs.
nl utility is compliant with the
X/Open System Interfaces option of the IEEE Std 1003.1-2008
nl utility first appeared in
AT&T System V Release 2 UNIX. It
was added to the OpenBSD 5.5 release.
|October 28, 2016||OpenBSD-current|