Update nl(1) manpage

This commit is contained in:
sin 2014-12-04 13:49:07 +00:00
parent 88a6d6f97e
commit 1150a5cbc9
2 changed files with 43 additions and 43 deletions

84
nl.1
View File

@ -1,46 +1,46 @@
.TH NL 1 sbase\-VERSION .Dd December 4, 2014
.SH NAME .Dt NL 1 sbase\-VERSION
nl \- number lines .Os
.SH SYNOPSIS .Sh NAME
.B nl .Nm nl
.RB [ \-b .Nd line numbering filter
.IR mode ] .Sh SYNOPSIS
.RB [ \-i .Nm nl
.IR increment ] .Op Fl b Ar type
.RB [ \-s .Op Fl i Ar incr
.IR separator ] .Op Fl s Ar sep
.RI [ file ] .Op Ar file
.SH DESCRIPTION .Sh DESCRIPTION
.B nl .Nm
reads each file in sequence and writes it to stdout with non\-empty lines reads lines from the named
numbered. If no file is given, nl reads from stdin. .Ar file
.SH OPTIONS and writes them to stdout with non-empty lines
.TP numbered. If no file is given
.BI \-b " mode" .Nm
defines which lines will be numbered: reads from stdin.
.PD 0 .Sh OPTIONS
.RS .Bl -tag -width Ds
.TP .It Fl b Ar type
.B a Defines which lines will be numbered:
all lines. .Bl -tag -width pstringXX
.TP .It a
.B n All lines.
no lines. .It n
.TP No lines.
.BI p pattern .It t
only lines which match Only non-empty lines (default).
.IR pattern , .It p Ns Ar expr
Only lines which match
.Ar expr ,
a regular expression as defined in a regular expression as defined in
.IR regex (7). .IR regex (7).
.TP .TP
.B t .El
only non\-empty lines (default). .It Fl i Ar incr
.RE Defines the increment between numbered lines.
.PD .It Fl s Ar sep
.TP Defines the string used to separate line numbers and lines. By default this is
.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. a tab.
.El
.Sh SEE ALSO
.Xr pr 1

2
nl.c
View File

@ -18,7 +18,7 @@ static regex_t preg;
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [-b style] [-i increment] [-s sep] [file]\n", argv0); eprintf("usage: %s [-b type] [-i incr] [-s sep] [file]\n", argv0);
} }
int int