[–] veyron 15y ago ↗ Maybe a wiki would be more appropriate. Then we could contribute things like:Count the number of times a given line occurs with $ sort | uniq -c | sort -n$ awk '{x[$0]++}END{for(y in x) print y, x[y]}' (helpful on billion-line files, so that you dont have to sort)
1 comment
[ 3.3 ms ] story [ 8.1 ms ] threadCount the number of times a given line occurs with $ sort | uniq -c | sort -n
$ awk '{x[$0]++}END{for(y in x) print y, x[y]}' (helpful on billion-line files, so that you dont have to sort)