Commit | Line | Data |
---|---|---|
674befec KT |
1 | .th SORT I 5/7/73 |
2 | .sh NAME | |
3 | sort \*- sort a file | |
4 | .sh SYNOPSIS | |
5 | .bd sort | |
6 | [ | |
7 | .bd \*-anr | |
8 | ] [ \fB+\fIn\fR ] [ \fB\*-\fIn\fR ] [ input [ output ] ] | |
9 | .sh DESCRIPTION | |
10 | .it Sort | |
11 | sorts | |
12 | .it input | |
13 | and writes the result on | |
14 | .it output. | |
15 | If the output file is not given, | |
16 | the standard output is used. | |
17 | If the input file is missing, | |
18 | the standard input is used. | |
19 | Thus | |
20 | .it sort | |
21 | may be used as a filter. | |
22 | The input and output file may be the same. | |
23 | .s3 | |
24 | The sort is line-by-line in increasing ASCII collating sequence, | |
25 | except that upper-case letters are considered | |
26 | the same as the corresponding lower-case letters. | |
27 | .s3 | |
28 | .it Sort | |
29 | understands several flag arguments. | |
30 | .s3 | |
31 | .lp +4 4 | |
32 | \fB\*-a\fR Use strict ASCII collating sequence. | |
33 | .s3 | |
34 | .lp +4 4 | |
35 | \fB\*-n\fR An initial numeric string is sorted by numerical value. | |
36 | .s3 | |
37 | .lp +4 4 | |
38 | \fB\*-r\fR Output is in reverse order. | |
39 | .s3 | |
40 | .lp +4 4 | |
41 | \fB\*-\fIn\fR The first \fIn\fR fields in each line | |
42 | are ignored. A field is defined as a string of non-space, non-tab | |
43 | characters separated by tabs and spaces from its neighbors. | |
44 | .s3 | |
45 | .lp +4 4 | |
46 | \fB+\fIn\fR The first \fIn\fR characters are ignored | |
47 | in the sort. | |
48 | Fields (with \fB\*-\fIn\fR) | |
49 | are skipped before characters. | |
50 | .s3 | |
51 | .i0 | |
52 | .sh FILES | |
53 | /tmp/stm? | |
54 | .sh BUGS | |
55 | The | |
56 | largest file that can be | |
57 | sorted is about 128K bytes. |