Manual Pages for UNIX Darwin command on man nl
MyWebUniversity

Manual Pages for UNIX Darwin command on man nl

NL(1) BSD General Commands Manual NL(1)

NAME

nnll - line numbering filter

SYNOPSIS

nnll [-pp] [-bb type] [-dd delim] [-ff type] [-hh type] [-ii incr] [-ll num]

[-nn format] [-ss sep] [-vv startnum] [-ww width] [file]

DESCRIPTION

The nnll utility reads lines from the named file or the standard input if

the file argument is ommitted, applies a configurable line numbering fil-

ter operation and writes the result to the standard output.

The nnll 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 sections.

The starts of logical page sections are signalled by input lines contain-

ing nothing but one of the following sequences of delimiter characters: Line Start of \:\:\: header \:\: body \: footer

If the input does not contain any logical page section signalling direc-

tives, the text being read is assumed to consist of a single logical page body. The following options are available:

-bb type Specify the logical page body lines to be numbered. Recog-

nized type arguments are: aa Number all lines.

tt Number only non-empty lines.

nn No line numbering.

ppexpr Number only those lines that contain the basic regu-

lar expression specified by expr. The default type for logical page body lines is tt.

-dd delim Specify the delimiter characters used to indicate the start

of a logical page section in the input file. At most two

characters may be specified; if only one character is speci-

fied, the first character is replaced and the second charac-

ter remains unchanged. The default delim characters are ``\:''.

-ff type Specify the same as -bb type except for logical page footer

lines. The default type for logical page footer lines is nn.

-hh type Specify the same as -bb type except for logical page header

lines. The default type for logical page header lines is nn.

-ii incr Specify the increment value used to number logical page

lines. The default incr value is 1.

-ll num If numbering of all lines is specified for the current logi-

cal section using the corresponding -bb aa, -ff aa or -hh aa

option, specify the number of adjacent blank lines to be

considered as one. For example, -ll 2 results in only the

second adjacent blank line being numbered. The default num value is 1.

-nn format Specify the line numbering output format. Recognized format

arguments are: llnn Left justified. rrnn Right justified, leading zeros suppressed. rrzz Right justified, leading zeros kept. The default format is rrnn.

-pp Specify that line numbering should not be restarted at logi-

cal page delimiters.

-ss sep Specify the characters used in separating the line number

and the corresponding text line. The default sep setting is a single tab character.

-vv startnum Specify the initial value used to number logical page lines;

see also the description of the -pp option. The default

startnum value is 1.

-ww width Specify the number of characters to be occupied by the line

number; in case the width is insufficient to hold the line number, it will be truncated to its width least significant digits. The default width is 6. DIAGNOSTICS

The nnll utility exits 0 on success, and >0 if an error occurs.

SEE ALSO

jot(1), pr(1) STANDARDS

The nnll utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').

HISTORY

The nnll utility first appeared in AT&T System V.2 UNIX.

BSD September 20, 2001 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™