Skip to content

Instantly share code, notes, and snippets.

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 andreadellacorte/8cf8c33d4497a5661c145a31f4338c61 to your computer and use it in GitHub Desktop.
Save andreadellacorte/8cf8c33d4497a5661c145a31f4338c61 to your computer and use it in GitHub Desktop.
Count frequency of words in a text
cat text.txt | tr '[:space:]' '[\n*]' | tr -cd "[:alnum:]\n"| tr "[:lower:]" "[:upper:]" | grep -v "^\s*$" | sort | uniq -c | sort -bnr > text.fqr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment