MPE/iX Shell and Utilities Reference Manual, Vol 2
sort(1) MPE/iX Shell and Utilities sort(1)
NAME
sort — sort/merge utility
SYNOPSIS
sort [–cmu][–o outfile][–t char][–y[n]] [–zn][–bdfiMnr]
[-k startpos[,endpos]] ... [file ...]
sort [–cmu][–o outfile][–t char][–yn][–zn][–bdfiMnr]
[+startposition [–endposition]] ... [file ...]
DESCRIPTION
The sort command implements a full sort and merge facility. sort operates on input files
containing records which are separated by the newline character.
When you do not specify either the –c or the –m option, sort sorts the concatenation of all
input files and produces the output on standard output.
Options
sort accepts the following options:
–b skips, for comparison purposes, any leading white space (blank or tab) in any field
(or key specification).
–c checks input files to ensure that they are correctly ordered according to the key posi-
tion and sort ordering options specified, but does not modify or output the files. This
option only affects the exit code.
–d uses dictionary ordering. sort examines only blanks, upper and lowercase letters,
and numbers when making comparisons.
–f converts lowercase letters to uppercase for comparison purposes.
–i ignores, for comparison purposes, non-printable characters.
–k [startpos,[endpos]]
specifies a sorting key. See the Sorting Keys section of this man page for more infor-
mation.
–M assumes that the field contains a month name for comparison purposes. Any leading
white space is ignored. If the field starts with the first three letters of a month name
in upper or lowercase, the comparisons are in month-in-year order. Anything that is
not a recognizable month name compares less than JAN.
–m merges files into one sorted output stream. This option assumes that each input file is
correctly ordered according to the other options specified on the command line; you
can check this with the –c option.
Commands and Utilities 1-559