Implement nl -n format

This commit is contained in:
sin
2015-02-20 14:12:03 +00:00
parent b8fbaa9b0d
commit cd51795423
3 changed files with 37 additions and 3 deletions

18
nl.1
View File

@@ -8,6 +8,7 @@
.Nm
.Op Fl b Ar type
.Op Fl i Ar incr
.Op Fl n Ar format
.Op Fl s Ar sep
.Op Fl v Ar startnum
.Op Fl w Ar width
@@ -40,6 +41,23 @@ a regular expression as defined in
.El
.It Fl i Ar incr
Defines the increment between numbered lines.
.It Fl n Ar format
Specify the line number output format.
The
.Ar format
can be any of the following:
.Bl -tag -width pstringXX
.It ln
Left justified.
.It rn
Right justified.
.It rz
Right justified with leading zeroes.
.El
.Pp
The default
.Ar format
is rn.
.It Fl s Ar sep
Defines the string used to separate line numbers and lines. By default this is
a tab.