Command
sort
Explanation
sort arranges lines of text files in alphabetical or numerical order.
Examples
Sort alphabetically
sort file.txt
Sort numerically
sort -n numbers.txt
Sort in reverse order
sort -r file.txt
sort
sort arranges lines of text files in alphabetical or numerical order.
Sort alphabetically
sort file.txt
Sort numerically
sort -n numbers.txt
Sort in reverse order
sort -r file.txt