sbase/nl.1

47 lines
763 B
Groff
Raw Normal View History

2011-05-29 20:30:44 +00:00
.TH NL 1 sbase\-VERSION
.SH NAME
nl \- number lines
.SH SYNOPSIS
.B nl
.RB [ \-b
.IR mode ]
.RB [ \-i
.IR increment ]
.RB [ \-s
.IR separator ]
2014-12-04 12:04:41 +00:00
.RI [ file ]
2011-05-29 20:30:44 +00:00
.SH DESCRIPTION
.B nl
2011-06-02 19:38:48 +00:00
reads each file in sequence and writes it to stdout with non\-empty lines
2011-05-29 20:30:44 +00:00
numbered. If no file is given, nl reads from stdin.
.SH OPTIONS
.TP
.BI \-b " mode"
defines which lines will be numbered:
2011-06-10 23:29:06 +00:00
.PD 0
2011-05-29 20:30:44 +00:00
.RS
.TP
.B a
all lines.
.TP
.B n
no lines.
.TP
.BI p pattern
only lines which match
.IR pattern ,
a regular expression as defined in
.IR regex (7).
.TP
.B t
2011-06-02 19:38:48 +00:00
only non\-empty lines (default).
2011-05-29 20:30:44 +00:00
.RE
2011-06-10 23:29:06 +00:00
.PD
2011-05-29 20:30:44 +00:00
.TP
.BI \-i " increment"
defines the increment between numbered lines.
.TP
.BI \-s " separator"
defines the string used to separate line numbers and lines. By default this is
a tab.