sort(1) General Commands Manual sort(1)

sort - Display sorted concatenation of all FILE(s). With no FILE, or when FILE is -, read standard input.

sort [--help] [--version] [--sort] [-h|--human-numeric-sort] [-M|--month-sort] [-n|--numeric-sort] [-g|--general-numeric-sort] [-V|--version-sort] [-R|--random-sort] [-d|--dictionary-order] [-m|--merge] [-c|--check] [-C|--check-silent] [-f|--ignore-case] [-i|--ignore-nonprinting] [-b|--ignore-leading-blanks] [-o|--output] [-r|--reverse] [-s|--stable] [-u|--unique] [-k|--key] [-t|--field-separator] [-z|--zero-terminated] [--parallel] [-S|--buffer-size] [-T|--temporary-directory] [--compress-program] [--batch-size] [--files0-from] [--debug] [files]

Display sorted concatenation of all FILE(s). With no FILE, or when FILE is -, read standard input.

Print help information.
Print version information.

[possible values: general-numeric, human-numeric, month, numeric, version, random]

compare according to human readable sizes, eg 1M > 100k
compare according to month name abbreviation
compare according to string numerical value
compare according to string general numerical value
Sort by SemVer version number, eg 1.12.2 > 1.1.2
shuffle in random order
consider only blanks and alphanumeric characters
merge already sorted files; do not sort
check for sorted input; do not sort

[possible values: silent, quiet, diagnose-first]

exit successfully if the given file is already sorted, and exit with status 1 otherwise.
fold lower case to upper case characters
ignore nonprinting characters
ignore leading blanks when finding sort keys in each line
write output to FILENAME instead of stdout
reverse the output
stabilize sort by disabling last-resort comparison
output only the first of an equal run
sort by a key
custom separator for -k
line delimiter is NUL, not newline
change the number of threads running concurrently to NUM_THREADS
sets the maximum SIZE of each segment in number of sorted items
use DIR for temporaries, not $TMPDIR or /tmp
compress temporary files with PROG, decompress with PROG -d; PROG has to take input from stdin and output to stdout
Merge at most N_MERGE inputs at once.
read input from the files specified by NUL-terminated NUL_FILES
underline the parts of the line that are actually used for sorting
[files]

The key format is FIELD[.CHAR][OPTIONS][,FIELD[.CHAR]][OPTIONS].

Fields by default are separated by the first whitespace after a non-whitespace character. Use -t to specify a custom separator. In the default case, whitespace is appended at the beginning of each field. Custom separators however are not included in fields.

FIELD and CHAR both start at 1 (i.e. they are 1-indexed). If there is no end specified after a comma, the end will be the end of the line. If CHAR is set 0, it means the end of the field. CHAR defaults to 1 for the start position and to 0 for the end position.

Valid options are: MbdfhnRrV. They override the global options for this key.

v0.0.26

sort 0.0.26