$ cat a.out
advanceadvancebox box box
cow
Remove duplicate lines
$ uniq a.out advance box
Count Number of Occurrence
$ uniq -c a.out 2 advance 3 box 1 cow
Print out duplicate lines
$ uniq -d a.out advance box
$ cat a.out
advanceadvancebox box box
cow
Remove duplicate lines
$ uniq a.out advance box
Count Number of Occurrence
$ uniq -c a.out 2 advance 3 box 1 cow
Print out duplicate lines
$ uniq -d a.out advance box
Comments