Created
March 1, 2013 16:47
-
-
Save wx13/5065970 to your computer and use it in GitHub Desktop.
one-liner to get word frequencies from a file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strings $1 | sed 's/[^a-zA-Z0-9]/\n/g' | egrep '[a-zA-Z]{5}' | tr '[:upper:]' '[:lower:]' | awk '{++a[$1]}END{for(x in a){print a[x], x}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment