Skip to content

Instantly share code, notes, and snippets.

@rriemann
Created February 9, 2018 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rriemann/a6ccc8bb95b53b87194068bad9670d65 to your computer and use it in GitHub Desktop.
Save rriemann/a6ccc8bb95b53b87194068bad9670d65 to your computer and use it in GitHub Desktop.
Static Text Analysis: Word Frequency
# https://unix.stackexchange.com/a/41480/148389
# https://unix.stackexchange.com/a/171604/148389
# here, the file to analyise is parts.md
cat parts.md | tr -c '[:alnum:]' '[\n*]' | tr '[:upper:]' '[:lower:]' | fgrep -v -w -f /usr/share/groff/1.22.3/eign | sort | uniq -c | sort -nr | head -20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment