sort

The command sort sorts lines of text files.

By default, the sorting is performed by increasing alphanumerical order. The main key is the first column, the secondary key is the second column, etc.

sort options meaning
-n numerical sort
-k col column col is used as key (several keys can be given in priority order)
-r decreasing order (default is ascending)
-u only output the first of an equal run