Counting Words - Anyone have a better way?
Can someone come up with a better way to do this?
cat ./index.rst | tr [:upper:] [:lower:] | sed -r 's/ /\n/g' | tr -d [:punct:] | sort | uniq -c | sort
That should give a rough estimate of how many times a word is used in a plain text document in order form least used to most used. (Some of punctuation make an exact analysis more difficult, in particular ')
Thoughts?