There are some options you can give to uniq:
- -c will count the number of repetitions of lines
- -d will do the "opposite" of the normal behaviour, namely will print out only the duplicate lines
- -i will ignore cases during comparison
You can use this command to get unique lines in the output of other commands as in the case of sort.