3 ms·
sort | uniq -c | sort -n is something I use all the time to get sorted frequency tables.
by etrain 14y ago
sort | uniq -c | sort -n
is something I use all the time to get sorted frequency tables.
- etrain 14y agoAnd, by the way, the two commands are something that could be done in O(n), rather than O(n*log(n)) - but this little procedure is so damn easy to write, that on relatively thin inputs that are less than 20m lines long, I usually just do this.