-2

This question already has an answer here:

How to find the most popular word in a text file through the linux terminal? Need to write a script

marked as duplicate by Stephen Rauch, thrig, sebasth, Romeo Ninov, Jeff Schaller Nov 30 '17 at 11:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

This has been answered many times, please use search next time.

tr -c '[:alnum:]' '[\n*]' < test.txt | sort | uniq -c | sort -nr | head -10

Not the answer you're looking for? Browse other questions tagged or ask your own question.