Skip to content

Instantly share code, notes, and snippets.

@jackz314 jackz314/occur.sh
Created Jun 29, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.