$ cat tonguetwister.txt | tr '[a-z]' '[A-Z]' | tr '[:punct:]' ' ' | tr '\t' ' ' | tr ' ' '\n' | sed '/^$/d' | sort -d | uniq -c | sort -nr
tr -sc '[A-Z][a-z]' '[\012*]' < corpora/xmasCarol.txt | sort | uniq -c > xmasCarol.hist
URLs:
Ref: http://tips.enderunix.org/view.php?id=1234&lang=en