Ravi Sir's Cards › AWS
Count data fast
This revision card explains Count data fast. It starts from the need that count lines. It describes count repeats. The how-to section notes only duplicates. An example on the card is read gz logs.
Read card text
What this card says
Why do we need it?
Count lines.
wc -l orders.csv
What is it?
Count repeats.
sort ips.txt | uniq -c
How to do it
Only duplicates.
sort ids.txt | uniq -d
Example
Read gz logs.
zcat app.log.1.gz | wc -l