Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nl(1) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

awk(1)

cat(1)

pr(1)

sed(1)




nl(1) nl(1)
NAME nl - line numbering filter SYNOPSIS nl [-btype] [-ddelim] [-ftype] [-htype] [-iincr] [-lnum] [-nformat] [-p] [-ssep] [-vstart#] [-wwidth] 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 in accordance with 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 header, body, and footer (for example, 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. FLAG OPTIONS Command options may appear in any order and may be intermin- gled with an optional file name. Only one file may be named. The flag options are: -btype Specifies which logical page body lines are to be numbered. Recognized types and their meaning are: a, number all lines; t, number lines with printable text only; n, no line numbering; pstring, number only lines that contain the regular expression specified in string. Default type for logical page body is t (text lines numbered). -htype Same as -btype except for header. Default type for logical page header is n (no lines numbered). April, 1990 1



nl(1) nl(1)
-ftype Same as -btype except for footer. Default for logical page footer is n (no lines num- bered). -p Do not restart numbering at logical page del- imiters. -vstart# Start# is the initial value used to number logical page lines. Default is 1. -iincr incr is the increment value used to number logical page lines. Default is 1. -ssep sep is the character(s) used in separating the line number and the corresponding text line. Default sep is a tab. -wwidth width is the number of characters to be used for the line number. Default width is 6. -nformat format is the line numbering format. Recog- nized values are: ln, left justified, lead- ing zeroes suppressed; rn, right justified, leading zeroes suppressed; rz, right justi- fied, leading zeroes kept. Default format is rn (right justified). -lnum num is 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 op- tion is set). Default is 1. -dxx The delimiter characters specifying the start of a logical page section may be changed from the default characters (\:) to two user- specified characters. If only one character is entered, the second character remains the default character (:). No space should ap- pear between the -d and the delimiter charac- ters. To enter a backslash, use two backslashes. EXAMPLES nl -v10 -i10 -d!+ file1 will number file1 starting at line number 10 with an incre- ment of ten. The logical page delimiters are !+. FILES /bin/nl 2 April, 1990



nl(1) nl(1)
SEE ALSO awk(1), cat(1), pr(1), sed(1). April, 1990 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026