Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nl(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

awk(1)

cat(1)

pr(1)

sed(1)




nl(1) nl(1)
NAME nl - processes a file through a line numbering filter SYNOPSIS nl [-btype] [-ddelim] [-ftype] [-htype] [-iincr] [-lnum] [-nformat] [-p] [-ssep] [-vstart#] [-wwidth] file ARGUMENTS -btype Specifies which logical page body lines are to be numbered. Recognized types and their meanings are: a number all lines; t numbers the lines with printable text only; n no line numbering; pstring numbers only the lines that contain the regular expression specified in string. Default type for logical page body is t (text lines numbered). -ddelim Specifies the delimiter characters indicating 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 appear between the -d and the delimiter characters. To enter a backslash, use two backslashes. -ftype Specifies which logical footer lines are to be numbered. The default for logical page footer is n (no lines numbered). file Specifies the file to be read. If this argument is not given, the standard input is read. -htype Specifies which logical header lines are to be numbered. The default type for logical page header is n (no lines numbered). -iincr Numbers logical page lines with the increment value of incr. The default is 1. January 1992 1



nl(1) nl(1)
-lnum Specifies the number of blank lines, num, to be considered as one. For example, -l2 results in only the second adjacent blank being numbered (if the appropriate -ha, -ba, and/or -fa option is set). The default is 1. -nformat Specifies the line numbering format. The recognized values are: ln left justified, leading zeroes suppressed; rn right justified, leading zeroes suppressed; rz right justified, leading zeroes kept. The default line numbering format is rn (right justified). -p Does not restart numbering at logical page delimiters. -ssep Separates the line number and the corresponding text line with sep. The default character is a tab. -vstart# Numbers logical page lines with the initial value start#. The default is 1. -wwidth Specifies width as the number of characters to be used for the line number. The default width is 6. DESCRIPTION nl reads lines from the named file and reproduces the lines on the standard output. Lines are numbered on the left in accordance with the command options in effect. The nl program 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 section. 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): 2 January 1992



nl(1) nl(1)
Line contents Start of \:\:\: header \:\: body \: footer Unless otherwise specified, nl assumes the text being read is in a single logical page body. EXAMPLES The command: nl -v10 -i10 -d!+ file1 will number file1 starting at line number ten with an increment of ten. The logical page delimiters are !+. FILES /bin/nl Executable file SEE ALSO awk(1), cat(1), pr(1), sed(1) January 1992 3

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