3 ms·
to count the unique lines from a file: cat animals.txt | awk '{ cnts[$0] += 1 } END { for (v in cnts) print cnts[v], v }' https://blog.jpalardy.com/posts/alte
by known 7y ago
to count the unique lines from a file:
cat animals.txt | awk '{ cnts[$0] += 1 } END { for (v in cnts) print cnts[v], v }'
https://blog.jpalardy.com/posts/alternative-to-sort-uniq-c/ https://blog.jpalardy.com/posts/alternative-to-sort-uniq-c/