Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

nl(1) OSS Shell and Utilities Reference Manual
NAME
nl - Numbers lines in a file
SYNOPSIS
nl
[-b type ]
[-d delimiter1[delimiter2 ]]
[-f type ]
[-h type ]
[-i number ]
[-l number ]
[-n format ]
[-p ]
[-s [separator ]]
[-v number ]
[-w number ]
[file ]
FLAGS
Use the following flags to change the default settings. If a particular flag is not specified, nl uses
its default value.
-b type Specifies which logical page body section lines to number. The recognized values for
type are:
a Numbers all lines
t Does not number blank lines (the default value for -b)
n Does not number any lines
ppattern Numbers only those lines containing the basic regular expression
specified by pattern
-d delimiter1[delimiter2 ]
Uses delimiter1 and delimiter2 as the delimiter characters for the start of a logical page
section. The two default characters are \: (backslash followed by a colon). You can
specify either one or two characters after the -d flag. If you enter only one character
after -d, the second delimiter character remains the default (:). If you want to use a
backslash as a delimiter, you must enter two backslashes (\\).
-f type Specifies which logical page footer lines to number. The values recognized for type
are the same as those for -b type. The default value for type in the -f flag is n (no lines
numbered).
-h type Specifies which logical page header lines to number. The values recognized for type
are the same as those for -b type. The default value for type in the -h flag is n (no lines
numbered).
-i number
Increments logical page line numbers by number. The default value of number is 1.
-l number
Counts number blank lines as 1. For example, -l 3 numbers only the third adjacent
blank (if the appropriate -h a, -b a,or-f a ag is set). The default value of number is 1.
640
Hewlett-Packard Company 527188-021