sort.1: convert to mandoc

This commit is contained in:
Hiltjo Posthuma 2015-01-30 23:49:13 +01:00
parent f2eb5d3b2d
commit 4e7cbbee28

102
sort.1
View File

@ -1,67 +1,83 @@
.TH SORT 1 sbase\-VERSION .Dd January 30, 2015
.SH NAME .Dt SORT 1 sbase\-VERSION
sort \- sort lines .Os
.SH SYNOPSIS .Sh NAME
.B sort .Nm sort
.RB [ \-bnru ] .Nd sort lines
.RB [ \-t .Sh SYNOPSIS
.IR delim ] .Nm
.RB [ \-k .Op Fl bnru
.IR key ]... .Op Fl t Ar delim
.RI [ file ...] .Op Fl k Ar key ...
.SH DESCRIPTION .Op Ar file ...
.B sort .Sh DESCRIPTION
.Nm
writes the sorted concatenation of the given files to stdout. If no file is writes the sorted concatenation of the given files to stdout. If no file is
given, sort reads from stdin. given, sort reads from stdin.
.SH OPTIONS .Sh OPTIONS
.TP .Bl -tag -width Ds
.B \-C .It Fl C
check that the concatenation of the given files is sorted rather than sorting check that the concatenation of the given files is sorted rather than sorting
them. In this mode, no output is printed to stdout, and the exit status them. In this mode, no output is printed to stdout, and the exit status
indicates the result of the check. indicates the result of the check.
.TP .It Fl b
.B \-b
skip leading whitespace of columns when sorting. skip leading whitespace of columns when sorting.
.TP .It Fl c
.B \-c
the same as the same as
.B \-C .Fl C
except that when disorder is detected, a message is printed to stderr except that when disorder is detected, a message is printed to stderr
indicating the location of the disorder. indicating the location of the disorder.
.TP .It Fl k Ar key
.BI \-k \ key
specifies a key definition of the form specifies a key definition of the form
.BR S [. s ][ f ][, E [. e ][ f ]] .Sm off
[.
.Sy s
][
.Sy f
][,
.Sy E
[.
.Sy e
][
.Sy f
]]
.Sm on
where where
.BR S , .Sm off
.BR s , .Sy S
.BR E , ,
.Sy s
,
.Sy E
.Sm on
and and
.B e .Sy e
are the starting column, starting character in that column, ending column and are the starting column, starting character in that column, ending column and
the ending character of that column respectively. If they are not specified, the ending character of that column respectively. If they are not specified,
.B s .Sy s
refers to the first character of the specified starting column, refers to the first character of the specified starting column,
.B E .Sy E
refers to the last column of every line, and refers to the last column of every line, and
.B e .Sy e
refers to the last character of that last column. refers to the last character of that last column.
.B f .Sy f
can be used to specify options can be used to specify options
.RB ( n , .Sm off
.BR b ) (
.Sy n
,
.Sy b
)
.Sm on
that only apply to this key definition. that only apply to this key definition.
.B b .Sy b
is special in that it only applies to the column that it was specified after. is special in that it only applies to the column that it was specified after.
.TP .It Fl n
.B \-n
perform a numeric sort. perform a numeric sort.
.TP .It Fl r
.B \-r
reverses the sort. reverses the sort.
.TP .It Fl t Ar delim
.BI \-t \ delim
specifies the field delimiter. specifies the field delimiter.
.TP .It Fl u
.B \-u
prints equal lines only once. prints equal lines only once.
.El