2011-06-02 08:03:34 -04:00
|
|
|
.TH NL 1 sbase\-VERSION
|
|
|
|
.SH NAME
|
|
|
|
sort \- sort lines
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B sort
|
2013-12-12 08:08:49 -05:00
|
|
|
.RB [ \-nru ]
|
2014-04-12 11:53:10 -04:00
|
|
|
.RB [ \-k
|
|
|
|
.I key
|
|
|
|
.R ]...
|
2011-06-02 08:03:34 -04:00
|
|
|
.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
|
2013-12-12 08:08:49 -05:00
|
|
|
.B \-n
|
|
|
|
perform a numeric sort.
|
|
|
|
.TP
|
2011-06-02 15:32:05 -04:00
|
|
|
.B \-r
|
2011-06-02 08:03:34 -04:00
|
|
|
reverses the sort.
|
2011-06-02 08:09:30 -04:00
|
|
|
.TP
|
2011-06-02 15:32:05 -04:00
|
|
|
.B \-u
|
2014-04-12 11:53:10 -04:00
|
|
|
prints equal lines only once.
|
|
|
|
.TP
|
|
|
|
.B \-k key
|
|
|
|
specifies a key definition of the form \fBS\fR[.\fBs\fR][,\fBE\fR[.\fBe\fR]],
|
|
|
|
where
|
|
|
|
.B S,
|
|
|
|
.B s,
|
|
|
|
.B 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,
|
|
|
|
s refers to the first character of the specified starting column, E refers to
|
|
|
|
the last column of every line, and e refers to the last character of that last
|
|
|
|
column.
|