sort file.txt

Category: Text Processing

sort file.txt

Sort lines of a file alphabetically

Sorts the lines of a file alphabetically (A to Z). The output is printed but the file itself is unchanged.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.