Skip to content

Instantly share code, notes, and snippets.

@brendansudol
Created August 1, 2012 15:58
Show Gist options
  • Save brendansudol/3228151 to your computer and use it in GitHub Desktop.
Save brendansudol/3228151 to your computer and use it in GitHub Desktop.
cat 1/*.txt 2/*.txt 3/*.txt 4/*.txt 5/*.txt > combined.txt
awk '{arr[$1]+=1} END {for (i in arr) {print i,arr[i]}}' combined.txt > counts.txt
sort -nrk 2 counts.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment