Command
uniqExplanation
uniq filters out repeated lines in a file, often used after sort.
Examples
Remove duplicate lines
sort file.txt | uniqCount occurrences
uniq -c file.txtShow only duplicate lines
uniq -d file.txtuniquniq filters out repeated lines in a file, often used after sort.
Remove duplicate lines
sort file.txt | uniqCount occurrences
uniq -c file.txtShow only duplicate lines
uniq -d file.txt