3 sort \- sort a file of ASCII lines
5 \fBsort\fR [\fB\-bcdf\&imnru\fR]\fR [\fB\-t\fIc\fR] [\fB\-o \fIname\fR] [\fB+\fIpos1\fR] [\fB\-\fIpos2\fR] \fIfile\fR ...\fR
20 # Skip leading blanks when making comparisons
23 # Check to see if a file is sorted
26 # Dictionary order: ignore punctuation
29 # Fold upper case onto lower case
32 # Ignore nonASCII characters
35 # Merge presorted files
38 # Numeric sort order (decimal)
41 # Numeric sort order (hex)
44 # Next argument is output file
47 # Reverse the sort order
50 # Following character is field separator
53 # Unique mode (delete duplicate lines)
57 # Sort keys numerically, reversed
60 # Sort using fields 2 and 3 as key
62 .B sort +2 \-t: \-o out
63 # Field separator is \fI:\fP
66 # Characters 3 through 5 form the key
70 sorts one or more files.
71 If no files are specified, \fIstdin\fR is sorted.
72 Output is written on standard output, unless \fB\-o\fP is specified.
73 The options \fB+\fIpos1 \fB\-\fIpos2\fR use only fields \fIpos1\fR
74 up to but not including \fIpos2\fR as the sort key, where a field is a
75 string of characters delimited by spaces and tabs, unless a different field
76 delimiter is specified with \fB\-t\fR.
77 Both \fIpos1\fR and \fIpos2\fR have the form \fIm.n\fR where \fIm\fR tells
78 the number of fields and \fIn\fR tells the number of characters.
79 Either \fIm\fR or \fIn\fR may be omitted.