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