All words only.
1 |
cat file | tr -sc '[:alpha:]' '[\n*]' | sort | uniq -c |sort -nr |
All words and digits
1 |
cat file | tr -sc '[:alnum:]' '[\n*]' | sort | uniq -c |sort -nr |
Sometimes piping to less on each is helpful depending on how big your file is.