uniq file.txt

Category: Text Processing

uniq file.txt

Remove consecutive duplicate lines

Removes consecutive duplicate lines from the output. Only works on adjacent duplicates, so sort first if needed.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.