Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (s) sort(1)
/*
* -ka.b,c.d = if d==0 then +(a-1).(b-1) -c.d
* else +(a-1).(b-1) -(c-1).d
*/
-m Merges only (assumes sorted input).
-n Sorts any initial numeric strings (consisting of optional spaces, optional dashes, and
zero or more digits with optional radix character and thousands separator, as dened by
the current locale) by arithmetic value. An empty digit string is treated as zero; leading
zeros and signs on zeros do not affect ordering.
-o output_file
Directs output to output_le instead of standard output. output_le can be the same as
one of the input les.
-r Reverses the order of the specied sort.
-t character
Sets the eld separator character to character. The character argument is not con-
sidered to be part of a eld (although it can be included in a sort key). Each occurrence
of character is signicant (for example, two consecutive occurrences of character del-
imit an empty eld). To specify the tab character as the eld separator, you must
enclose it in ’’(single quotes).
The default eld separator is one or more spaces.
-T directory
Places all the temporary les that are created in directory.
-u Suppresses all but one in each set of equal lines. Ignored characters (such as leading
tabs and spaces) and characters outside of sort keys are not considered in this type of
comparison.
If used with the -c ag, -u checks that there are no lines with duplicate keys, in addition
to checking that the input le is sorted.
-y [kilobytes]
Starts the sort command using kilobytes of main storage and adds storage as needed.
(If kilobytes is less than the minimum storage size or greater than the maximum, the
minimum or maximum is used instead.) If the -y ag is omitted, the sort command
starts with the default storage size; -y 0 starts with minimum storage, and -y (with no
value) starts with the maximum storage. The amount of storage used by the sort com-
mand has a signicant impact on performance. Sorting a small le in a large amount of
storage is wasteful.
-z record_size
Prevents abnormal termination if lines being sorted are longer than the default buffer
size can handle. When the -c or -m ags are specied, the sorting phase is omitted and
a system default size buffer is used. If sorted lines are longer than this size, sort ter-
minates abnormally. The -z option species that the longest line be recorded in the sort
phase so that adequate buffers can be allocated in the merge phase. record_size must
be a value in bytes equal to or greater than the number of bytes in the longest line to be
merged.
+fskip.cskip
Species the start position of a key eld. See the -k ag for a description of the current
way to perform this operation. (Obsolescent)
527188-004 Hewlett-Packard Company 845