Skip to content

Instantly share code, notes, and snippets.

@jackz314
Created June 29, 2019 22:11
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 jackz314/4cfb8064ed029a9375967c67ad425312 to your computer and use it in GitHub Desktop.
Save jackz314/4cfb8064ed029a9375967c67ad425312 to your computer and use it in GitHub Desktop.
Sort occurrence of words among a directory of files
cat *.txt | tr '[:space:]' '[\n*]' | grep -v "^\s*$" | sort | uniq -c | sort -bnr | head -n 100
#extension .txt, limit result to top 100. Change if needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment