summaryrefslogtreecommitdiffstats
path: root/contrib/gnu-sort/man/sort.1
blob: 2bb445dd74e8f58aa2698c2214ca20b55bca78a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.33.
.TH SORT "1" "March 2004" "sort (coreutils) 5.2.1" "User Commands"
.SH NAME
sort \- sort lines of text files
.SH SYNOPSIS
.B sort
[\fIOPTION\fR]... [\fIFILE\fR]...
.SH DESCRIPTION
.\" Add any additional description here
.PP
Write sorted concatenation of all FILE(s) to standard output.
.PP
Ordering options:
.PP
Mandatory arguments to long options are mandatory for short options too.
.HP
\fB\-b\fR, \fB\-\-ignore\-leading\-blanks\fR ignore leading blanks
.TP
\fB\-d\fR, \fB\-\-dictionary\-order\fR
consider only blanks and alphanumeric characters
.TP
\fB\-f\fR, \fB\-\-ignore\-case\fR
fold lower case to upper case characters
.TP
\fB\-g\fR, \fB\-\-general\-numeric\-sort\fR
compare according to general numerical value
.TP
\fB\-i\fR, \fB\-\-ignore\-nonprinting\fR
consider only printable characters
.TP
\fB\-M\fR, \fB\-\-month\-sort\fR
compare (unknown) < `JAN' < ... < `DEC'
.TP
\fB\-n\fR, \fB\-\-numeric\-sort\fR
compare according to string numerical value
.TP
\fB\-r\fR, \fB\-\-reverse\fR
reverse the result of comparisons
.PP
Other options:
.TP
\fB\-c\fR, \fB\-\-check\fR
check whether input is sorted; do not sort
.TP
\fB\-k\fR, \fB\-\-key\fR=\fIPOS1[\fR,POS2]
start a key at POS1, end it at POS 2 (origin 1)
.TP
\fB\-m\fR, \fB\-\-merge\fR
merge already sorted files; do not sort
.TP
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
write result to FILE instead of standard output
.TP
\fB\-s\fR, \fB\-\-stable\fR
stabilize sort by disabling last-resort comparison
.TP
\fB\-S\fR, \fB\-\-buffer\-size\fR=\fISIZE\fR
use SIZE for main memory buffer
.HP
\fB\-t\fR, \fB\-\-field\-separator\fR=\fISEP\fR use SEP instead of non-blank to blank transition
.TP
\fB\-T\fR, \fB\-\-temporary\-directory\fR=\fIDIR\fR
use DIR for temporaries, not $TMPDIR or /tmp;
multiple options specify multiple directories
.TP
\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
.TP
\fB\-z\fR, \fB\-\-zero\-terminated\fR
end lines with 0 byte, not newline
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
output version information and exit
.PP
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.
.PP
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.
.PP
With no FILE, or when FILE is -, read standard input.
.PP
*** 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.
.SH AUTHOR
Written by Mike Haertel and Paul Eggert.
.SH "REPORTING BUGS"
Report bugs to <bug-coreutils@gnu.org>.
.SH COPYRIGHT
Copyright \(co 2004 Free Software Foundation, Inc.
.br
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.SH "SEE ALSO"
The full documentation for
.B sort
is maintained as a Texinfo manual.  If the
.B info
and
.B sort
programs are properly installed at your site, the command
.IP
.B info coreutils sort
.PP
should give you access to the complete manual.
OpenPOWER on IntegriCloud