# -u, --unique # only print unique lines $ cat file.txt 1 1 2 3 5 5 7 7 $ uniq -u file.txt 2 3 sort < filea | uniq > fileb
sort < file | uniq > output cat file | sort | uniq