version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SORT |
|
|
2 |
!!!SORT |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
AUTHOR |
|
|
7 |
REPORTING BUGS |
|
|
8 |
COPYRIGHT |
|
|
9 |
SEE ALSO |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
sort - sort lines of text files |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__sort__ [[''OPTION'']... [[''FILE'']... |
|
|
19 |
!!DESCRIPTION |
|
|
20 |
|
|
|
21 |
|
|
|
22 |
Write sorted concatenation of all FILE(s) to standard |
|
|
23 |
output. |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
+POS1 [[-POS2] |
|
|
27 |
|
|
|
28 |
|
|
|
29 |
start a key at POS1, end it *before* POS2 (obsolescent) |
|
|
30 |
field numbers and character offsets are numbered starting |
|
|
31 |
with zero (contrast with the __-k__ option) |
|
|
32 |
|
|
|
33 |
|
|
|
34 |
__-b__ |
|
|
35 |
|
|
|
36 |
|
|
|
37 |
ignore leading blanks in sort fields or keys |
|
|
38 |
|
|
|
39 |
|
|
|
40 |
__-c__ |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
check if given files already sorted, do not |
|
|
44 |
sort |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
__-d__ |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
consider only [[a-zA-Z0-9 ] characters in keys |
|
|
51 |
|
|
|
52 |
|
|
|
53 |
__-f__ |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
fold lower case to upper case characters in |
|
|
57 |
keys |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
__-g__ |
|
|
61 |
|
|
|
62 |
|
|
|
63 |
compare according to general numerical value, imply |
|
|
64 |
__-b__ |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
__-i__ |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
consider only [[040-0176] characters in keys |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
__-k__ POS1[[,POS2] |
|
|
74 |
|
|
|
75 |
|
|
|
76 |
start a key at POS1, end it *at* POS2 field numbers and |
|
|
77 |
character offsets are numbered starting with one (contrast |
|
|
78 |
with zero-based +POS form) |
|
|
79 |
|
|
|
80 |
|
|
|
81 |
__-m__ |
|
|
82 |
|
|
|
83 |
|
|
|
84 |
merge already sorted files, do not sort |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
__-M__ |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
compare (unknown) |
|
|
91 |
-b__ |
|
|
92 |
|
|
|
93 |
|
|
|
94 |
__-n__ |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
compare according to string numerical value, imply |
|
|
98 |
__-b__ |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
__-o__ FILE |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
write result on FILE instead of standard output |
|
|
105 |
|
|
|
106 |
|
|
|
107 |
__-r__ |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
reverse the result of comparisons |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
__-s__ |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
stabilize sort by disabling last resort |
|
|
117 |
comparison |
|
|
118 |
|
|
|
119 |
|
|
|
120 |
__-t__ SEP |
|
|
121 |
|
|
|
122 |
|
|
|
123 |
use SEParator instead of non- to whitespace |
|
|
124 |
transition |
|
|
125 |
|
|
|
126 |
|
|
|
127 |
__-T__ DIRECTORY |
|
|
128 |
|
|
|
129 |
|
|
|
130 |
use DIRECTORY for temporary files, not $TMPDIR or |
|
|
131 |
/tmp |
|
|
132 |
|
|
|
133 |
|
|
|
134 |
__-u__ |
|
|
135 |
|
|
|
136 |
|
|
|
137 |
with __-c__: check for strict ordering otherwise: output |
|
|
138 |
only the first of an equal run |
|
|
139 |
|
|
|
140 |
|
|
|
141 |
__-z__ |
|
|
142 |
|
|
|
143 |
|
|
|
144 |
end lines with 0 byte, not newline, for find |
|
|
145 |
__-print0__ |
|
|
146 |
|
|
|
147 |
|
|
|
148 |
__--help__ |
|
|
149 |
|
|
|
150 |
|
|
|
151 |
display this help and exit |
|
|
152 |
|
|
|
153 |
|
|
|
154 |
__--version__ |
|
|
155 |
|
|
|
156 |
|
|
|
157 |
output version information and exit |
|
|
158 |
|
|
|
159 |
|
|
|
160 |
POS is F[[.C][[OPTS], where F is the field number and C the |
|
|
161 |
character position in the field, both counted from one with |
|
|
162 |
__-k__, from zero with the obsolescent form. OPTS is made |
|
|
163 |
up of one or more of Mbdfinr; this effectively disables |
|
|
164 |
global __-Mbdfinr__ settings for that key. If no key is |
|
|
165 |
given, use the entire line as the key. With no FILE, or when |
|
|
166 |
FILE is -, read standard input. |
|
|
167 |
!!AUTHOR |
|
|
168 |
|
|
|
169 |
|
|
|
170 |
Written by Mike Haertel. |
|
|
171 |
!!REPORTING BUGS |
|
|
172 |
|
|
|
173 |
|
|
|
174 |
Report bugs to |
|
|
175 |
!!COPYRIGHT |
|
|
176 |
|
|
|
177 |
|
|
|
178 |
Copyright 1999 Free Software Foundation, Inc. |
|
|
179 |
This is free software; see the source for copying |
|
|
180 |
conditions. There is NO warranty; not even for |
|
|
181 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
|
182 |
PURPOSE. |
|
|
183 |
!!SEE ALSO |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
The full documentation for __sort__ is maintained as a |
|
|
187 |
Texinfo manual. If the __info__ and __sort__ programs |
|
|
188 |
are properly installed at your site, the |
|
|
189 |
command |
|
|
190 |
|
|
|
191 |
|
|
|
192 |
__info sort__ |
|
|
193 |
|
|
|
194 |
|
|
|
195 |
should give you access to the complete manual. |
|
|
196 |
---- |