📄 nl.1
字号:
.TH nl 1.SH Namenl \- line numbering filter.SH Syntax.B nl[\fB\-h\fI type\fR][\fB\-b \fItype\fR][\fB\-f \fItype\fR][\fB\-v \fIstart\fR#][\fB\-i \fIincr\fR][\fB\-p\fR ][\fB\-l \fInum\fR][\fB\-s \fIsep\fR][\fB\-w \fIwidth\fR][\fB\-n \fIformat\fR][\fB\-d \fIdelim\fR]\fIfile\fR.SH Description.NXR "nl command"The.PN nlcommand reads lines from the named \fIfile\fP or from thestandard input, if no \fIfile\fP is named, andreproduces the lines on the standard output.Lines are numbered on the left in accordance withthe command options in effect..PPThe.PN nlcommand views the text it reads in terms of logical pages.Line numbering is reset at the startof each logical page.A logical page consists of aheader, a body, and a footer section.Empty sections are valid.Different line numbering optionsare independently availablefor header, body, and footer.For example, you can elect not to number header and footerlines while numbering blank linesin the body..PPThe start of logical page sections is signaled by inputlines containing nothing but the following delimiter characters:.br.RS 10.TP 15.I Line contents\^.I Start of\^.TP\e:\e:\e:header.TP\e:\e:body.TP\e:footer.sp.REUnless otherwise specified,.PN nlassumes that the text it is reading is in the bodyof a single logical page..SH OptionsCommand options may appear in any order andmay be intermingled with an optional file name.Only one file may be named..IP "\fB\-b \fItype\fR" 20Specifies which logical page body lines are to be numbered.The following are recognized \fItypes\fP and their meaning:.BR a ,number all lines;.BR t ,number lines with printable text only;.BR n ,no line numbering;.BI p string\^\fR,\fPnumber only lines that contain the regular expressionspecified in.IR string ..IPThe default \fItype\fP for logical page body is.B t(text lines numbered)..IP "\fB\-h \fItype\fR" 20Same as \fB\-b \fItype\fRexcept for header.Default \fItype\fP for logical page header is \fBn\fP(no lines numbered)..IP "\fB\-f \fItype\fR" 20Same as \fB\-b \fItype\fR except for footer.Default for logical page footer is \fBn\fP(no lines numbered)..IP \fB\-p\fR 20Do not restart numbering at logical page delimiters..IP "\fB\-v \fIstart#\fR" 20Theinitial value used to number logical page lines.Default is 1..IP "\fB\-i \fIincr\fR" 20The increment value usedto number logical page lines.Default is 1..IP "\fI\-s \fIsep\fR" 20The character used inseparating the line number and thecorresponding text line.Default \fIsep\fP is a tab..IP "\fB\-w \fIwidth\fR" 20The number of charactersused for the line number.Default \fIwidth\fP is 6..IP "\fB\-n \fIformat\fR" 20The line numbering format.Recognized values are the following:.BR ln ,left justified, leading zeroessuppressed;.BR rn ,right justified,leading zeroes suppressed;.BR rz ,right justified, leading zeroes kept.Default \fIformat\fP is \fBrn\fR (right justified)..IP "\fB\-l \fInum\fR" 20The number of blank lines to beconsidered as one.For example,.B \-l2results in only the second adjacent blankbeing numbered (if the appropriate.BR \-ha ,.BR \-ba ,or.B \-faoption is set).Default is.BR 1 ..IP "\fB\-d \fIxx\fR" 20The delimiter characters specifying the start of a logical pagesection may be changed from the default characters (\\:) totwo user-specified characters.If only one character is entered,the second character remains the default character (:).No space should appear between the.B \-dand the delimiter characters.To enter a backslash, you must type two backslashes (//)..SH Examples.EXnl \-v10 \-i10 \-d!+ file1.EEThis command numbers file1 starting at line number 10with an increment of ten.The logical page delimiters are !+..SH See Alsopr(1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -