# To show all lines without duplication:
# (`sort -u` and `uniq` have the same effect.)
sort <file> | uniq

# To show not duplicated lines:
sort <file> | uniq -u

# To show duplicated lines only:
sort <file> | uniq -d

# To count all lines:
sort <file> | uniq -c

# To count not duplicated lines:
sort <file> | uniq -uc

# To count only duplicated lines:
sort <file> | uniq -dc
