sort.1   [plain text]

.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.35.
.TH SORT "1" "November 2005" "sort 5.93" "User Commands"
sort \- sort lines of text files
.B sort
[\fIOPTION\fR]... [\fIFILE\fR]...
.\" Add any additional description here
Write sorted concatenation of all FILE(s) to standard output.
Mandatory arguments to long options are mandatory for short options too.
Ordering options:
\fB\-b\fR, \fB\-\-ignore\-leading\-blanks\fR
ignore leading blanks
\fB\-d\fR, \fB\-\-dictionary\-order\fR
consider only blanks and alphanumeric characters
\fB\-f\fR, \fB\-\-ignore\-case\fR
fold lower case to upper case characters
\fB\-g\fR, \fB\-\-general\-numeric\-sort\fR
compare according to general numerical value
\fB\-i\fR, \fB\-\-ignore\-nonprinting\fR
consider only printable characters
\fB\-M\fR, \fB\-\-month\-sort\fR
compare (unknown) < `JAN' < ... < `DEC'
\fB\-n\fR, \fB\-\-numeric\-sort\fR
compare according to string numerical value
\fB\-r\fR, \fB\-\-reverse\fR
reverse the result of comparisons
Other options:
\fB\-c\fR, \fB\-\-check\fR
check whether input is sorted; do not sort
\fB\-k\fR, \fB\-\-key\fR=\fIPOS1[\fR,POS2]
start a key at POS1, end it at POS2 (origin 1)
\fB\-m\fR, \fB\-\-merge\fR
merge already sorted files; do not sort
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
write result to FILE instead of standard output
\fB\-s\fR, \fB\-\-stable\fR
stabilize sort by disabling last\-resort comparison
\fB\-S\fR, \fB\-\-buffer\-size\fR=\fISIZE\fR
use SIZE for main memory buffer
\fB\-t\fR, \fB\-\-field\-separator\fR=\fISEP\fR
use SEP instead of non\-blank to blank transition
\fB\-T\fR, \fB\-\-temporary\-directory\fR=\fIDIR\fR
use DIR for temporaries, not $TMPDIR or /tmp;
multiple options specify multiple directories
\fB\-u\fR, \fB\-\-unique\fR
with \fB\-c\fR, check for strict ordering;
without \fB\-c\fR, output only the first of an equal run
\fB\-z\fR, \fB\-\-zero\-terminated\fR
end lines with 0 byte, not newline
display this help and exit
output version information and exit
POS is F[.C][OPTS], where F is the field number and C the character position
in the field.  OPTS is one or more single\-letter ordering options, which
override global ordering options for that key.  If no key is given, use the
entire line as the key.
SIZE may be followed by the following multiplicative suffixes:
% 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y.
With no FILE, or when FILE is \-, read standard input.
*** WARNING ***
The locale specified by the environment affects sort order.
Set LC_ALL=C to get the traditional sort order that uses
native byte values.
Written by Mike Haertel and Paul Eggert.
Report bugs to <bug\>.
Copyright \(co 2005 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <>.
There is NO WARRANTY, to the extent permitted by law.
The full documentation for
.B sort
is maintained as a Texinfo manual.  If the
.B info
.B sort
programs are properly installed at your site, the command
.B info sort
should give you access to the complete manual.