uniq

uniq#

De-duplicate adjacent lines (input must be sorted).

$ sort file | uniq
$ sort file | uniq -c
$ sort file | uniq -d
$ sort file | uniq -u