uniq command, filters the output (from either a file or stdin) to remove any duplicates.

Important Flags for uniq:

FlagsDescription
-cTo count the occurrences of every line in file or stdin
-dWill only print the lines that are repeated, not the one which are unique
-uWill only print lines that are already uniq
-iIgnores case(Default is case-sensitive)