Sort lines of text files. More information: https://www.gnu.org/software/coreutils/sort.
sort path/to/file
sort --reverse path/to/file
sort --ignore-case path/to/file
sort --numeric-sort path/to/file
/etc/passwd
by the 3rd field of each line numerically, using ”:” as a field separator:sort --field-separator=: --key=3n /etc/passwd
sort -t : -k 3,3n -k 4,4g /etc/passwd
sort --unique path/to/file
sort --output=path/to/file path/to/file