Wednesday, September 1, 2010

count the occurace of words in a file

cat filename | tr '[:punct:]' ' ' | tr ' ' '\012' | sort | uniq -c | sort -n 

No comments:

Post a Comment