sort -u file.txt

Category: Text Processing

sort -u file.txt

Sort and remove duplicate lines

Sorts and removes duplicate lines, keeping only unique lines. -u means 'unique'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.