Ravi Sir's Cards › AWS
Why uniq misses duplicates?
This interview card answers: Why uniq misses duplicates? Uniq only checks neighbours. Sort first, then uniq. Count repeats.
Read card text
What this card says
What it is
uniq only checks neighbours.
Why it matters
Sort first, then uniq.
How / example
Count repeats.
sort ips.txt | uniq -c | sort -nr