SORT(1)

NAME
sort - sort lines

SYNOPSIS
sort [-Cbcdfimnru] [-o outfile] [-t delim] [-k key ...] [file ...]

DESCRIPTION
sort writes the sorted concatenation of each file to stdout. If no file is given sort reads from stdin.

OPTIONS

-C  Check that the concatenation of the given files is sorted rather than sorting them. In this mode, no output is printed to stdout, and the exit status indicates the result of the check.

-b  Skip leading whitespace of columns when sorting.

-c  The same as -C except that when disorder is detected, a message is written to stderr indicating the location of the disorder.

-d  Skip non-whitespace and non-alphanumeric characters.

-f  Ignore letter case when sorting.

-i  Skip non-printable characters.

-k key
    Specify a key definition of the form S [. s][ f ][, E [. e][ f]] where S, s, E and e are the starting column, starting character in that column, ending column and the ending character of that column respectively. If they are not specified, s refers to the first character of the specified starting column, E refers to the last column of every line, and e refers to the last character of the ending column. f can be used to specify options (n, b) that only apply to this key definition. b is special in that it only applies to the column that it was specified after.

-m  Assume sorted input, merge only.

-n  Perform a numeric sort.

-o outfile
    Write output to outfile rather than stdout.

-r  Reverses the sort.

-t delim
    Set delim as the field delimiter.

-u  Print equal lines only once.

STANDARDS
POSIX.1-2013.