Part of Linux Commands Cheat Sheet
Sort command is used to sort a file, arranging the records in a particular order.
Sort file by line:
sort names.txt # -r for reverse sort -r names.txt
Use sort command in a pipeline
ls | sort
Sort and remove duplicate lines automatically
# -u for unique sort -u names.txt