Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (s) sort(1)
NAME
sort - Sorts or merges les
SYNOPSIS
Current syntax
sort
[-m]
[-o output_le]
[-Abdnru]
[-k keydef] ...
[-t character]
[-T directory]
[-y][kilobytes]
[-z record_size] ...
le ...
sort
-c
[-u]
[-Abdnru]
[-k keydef] ...
[-t character]
[-T directory]
[-y][kilobytes]
[-z record_size] ...
le ...
Obsolescent syntax
sort
[-Abcdmnru]
[-o output_le]
[-t character]
[-T directory]
[-y][kilobytes]
[-z record_size]
[+fskip][.cskip]
[-fskip][.cskip]
[-bdnr] ...
le ...
FLAGS
The sort command sorts lines in its input les and writes the result to standard output.
The -d, -f, -i, -n, and -r ags override the default ordering rules. When ordering ags appear
independent of any key eld specications, the requested eld ordering rules are applied globally
to all sort keys. When attached to a specic key (see -k), the specied ordering ags override all
global ordering ags for that key. In the obsolescent forms, if one or more of these ags follows
a +fskip ag, it affects only the key eld specied by that preceding ag.
-A Sorts on a byte-by-byte basis using each characters encoded value. On some systems,
extended characters will be considered negative values, and so sort before ASCII char-
acters. If you are sorting ASCII characters in a non-C/POSIX locale, this ag performs
much faster.
-b Ignores leading spaces and tabs when determining the starting and ending positions of
a restricted sort key. If the -b ag is specied before the rst -k ag, the -b ag is
527188-007 Hewlett-Packard Company 847