sort
sort
command is used to sort the contents of a file in a particular order. By default, it sorts a file assuming the contents are in ASCII. But it also can also be used to sort numerically by using appropriate options.
It has the following syntax
$ sort [options].. input-file
e.g. $ sort file.txt
Visit the following resources to learn more: