mirror of git://git.suckless.org/sbase
47 lines
798 B
Groff
47 lines
798 B
Groff
.Dd December 4, 2014
|
|
.Dt NL 1
|
|
.Os sbase
|
|
.Sh NAME
|
|
.Nm nl
|
|
.Nd line numbering filter
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl b Ar type
|
|
.Op Fl i Ar incr
|
|
.Op Fl s Ar sep
|
|
.Op Ar file
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
reads lines from the named
|
|
.Ar file
|
|
and writes them to stdout with non-empty lines numbered. If no
|
|
.Ar file
|
|
is given
|
|
.Nm
|
|
reads from stdin.
|
|
.Sh OPTIONS
|
|
.Bl -tag -width Ds
|
|
.It Fl b Ar type
|
|
Defines which lines will be numbered:
|
|
.Bl -tag -width pstringXX
|
|
.It a
|
|
All lines.
|
|
.It n
|
|
No lines.
|
|
.It t
|
|
Only non-empty lines (default).
|
|
.It p Ns Ar expr
|
|
Only lines which match
|
|
.Ar expr ,
|
|
a regular expression as defined in
|
|
.Xr regex 7 .
|
|
.El
|
|
.It Fl i Ar incr
|
|
Defines the increment between numbered lines.
|
|
.It Fl s Ar sep
|
|
Defines the string used to separate line numbers and lines. By default this is
|
|
a tab.
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Xr pr 1
|