Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (s) sort(1)
NAME
sort - Sorts or merges files
SYNOPSIS
Current syntax
sort
[-m]
[-o output_file]
[-Abdfinru]
[-k keydef] ...
[-t character]
[-T directory]
[-y][kilobytes]
[-z record_size] ...
file ...
sort
-c
[-u]
[-Abdfinru]
[-k keydef] ...
[-t character]
[-T directory]
[-y][kilobytes]
[-z record_size] ...
file ...
Obsolescent syntax
sort
[-Abcdfimnru]
[-o output_file]
[-t character]
[-T directory]
[-y][kilobytes]
[-z record_size]
[+fskip][.cskip]
[-fskip][.cskip]
[-bdfinr] ...
file ...
FLAGS
The sort command sorts lines in its input files and writes the result to standard output.
The -d, -f, -i, -n, and -r flags override the default ordering rules. When ordering flags appear
independent of any key field specifications, the requested field ordering rules are applied globally
to all sort keys. When attached to a specific key (see -k), the specified ordering flags override all
global ordering flags for that key. In the obsolescent forms, if one or more of these flags follows
a +fskip flag, it affects only the key field specified by that preceding flag.
-A Sorts on a byte-by-byte basis using each character’s 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 flag performs
much faster.
-b Ignores leading spaces and tabs when determining the starting and ending positions of
a restricted sort key. If the -b flag is specified before the first -k flag, the -b flag is
527188-004 Hewlett-Packard Company 8−43