2 ms·
This little trick came in very handy cat <file1> <file2> ... | sort | uniq -c | sort -n I have a variant of that which I use to count how often individual
by emeraldd 11y ago
This little trick came in very handy
cat <file1> <file2> ... | sort | uniq -c | sort -n
I have a variant of that which I use to count how often individual words appear in a body of text:
cat ${FILES} | tr [:upper:] [:lower:] | sed -r 's/\t/ /g' | sed -r "s/'s//g" | sed -r 's/ /\n/g' | tr -d [:punct:] | sort | uniq -c | sort -n