Research V4 development
[unix-history] / man / man1 / sort.1
CommitLineData
674befec
KT
1.th SORT I 5/7/73
2.sh NAME
3sort \*- 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
11sorts
12.it input
13and writes the result on
14.it output.
15If the output file is not given,
16the standard output is used.
17If the input file is missing,
18the standard input is used.
19Thus
20.it sort
21may be used as a filter.
22The input and output file may be the same.
23.s3
24The sort is line-by-line in increasing ASCII collating sequence,
25except that upper-case letters are considered
26the same as the corresponding lower-case letters.
27.s3
28.it Sort
29understands 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
42are ignored. A field is defined as a string of non-space, non-tab
43characters 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
47in the sort.
48Fields (with \fB\*-\fIn\fR)
49are skipped before characters.
50.s3
51.i0
52.sh FILES
53/tmp/stm?
54.sh BUGS
55The
56largest file that can be
57sorted is about 128K bytes.