0

Tip #246   Dealing with duplicate lines

You can use the 'uniq' command to handle duplicate lines in a file:

$ cat tst
a
a
b
c
c
d

$ uniq -d tst //show duplicated lines a c
$ uniq -u tst //show unique lines b d
$ uniq tst //remove duplicates a b c d