mirror of
git://git.suckless.org/sbase
synced 2024-12-25 16:32:37 +00:00
68 lines
1.5 KiB
Groff
68 lines
1.5 KiB
Groff
.TH SORT 1 sbase\-VERSION
|
|
.SH NAME
|
|
sort \- sort lines
|
|
.SH SYNOPSIS
|
|
.B sort
|
|
.RB [ \-bnru ]
|
|
.RB [ \-t
|
|
.IR delim ]
|
|
.RB [ \-k
|
|
.IR key ]...
|
|
.RI [ file ...]
|
|
.SH DESCRIPTION
|
|
.B sort
|
|
writes the sorted concatenation of the given files to stdout. If no file is
|
|
given, sort reads from stdin.
|
|
.SH OPTIONS
|
|
.TP
|
|
.B \-C
|
|
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
|
|
indicates the result of the check.
|
|
.TP
|
|
.B \-b
|
|
skip leading whitespace of columns when sorting.
|
|
.TP
|
|
.B \-c
|
|
the same as
|
|
.B \-C
|
|
except that when disorder is detected, a message is printed to stderr
|
|
indicating the location of the disorder.
|
|
.TP
|
|
.BI \-k \ key
|
|
specifies a key definition of the form
|
|
.BR S [. s ][ f ][, E [. e ][ f ]]
|
|
where
|
|
.BR S ,
|
|
.BR s ,
|
|
.BR E ,
|
|
and
|
|
.B e
|
|
are the starting column, starting character in that column, ending column and
|
|
the ending character of that column respectively. If they are not specified,
|
|
.B s
|
|
refers to the first character of the specified starting column,
|
|
.B E
|
|
refers to the last column of every line, and
|
|
.B e
|
|
refers to the last character of that last column.
|
|
.B f
|
|
can be used to specify options
|
|
.RB ( n ,
|
|
.BR b )
|
|
that only apply to this key definition.
|
|
.B b
|
|
is special in that it only applies to the column that it was specified after.
|
|
.TP
|
|
.B \-n
|
|
perform a numeric sort.
|
|
.TP
|
|
.B \-r
|
|
reverses the sort.
|
|
.TP
|
|
.BI \-t \ delim
|
|
specifies the field delimiter.
|
|
.TP
|
|
.B \-u
|
|
prints equal lines only once.
|