Skip to content

Instantly share code, notes, and snippets.

@alperyilmaz
Created November 17, 2016 13:14
Show Gist options
  • Save alperyilmaz/10ee7f9f05697b9530906051df5395a1 to your computer and use it in GitHub Desktop.
Save alperyilmaz/10ee7f9f05697b9530906051df5395a1 to your computer and use it in GitHub Desktop.
most frequent 5 letters in beginning of words in Emma
$ cat emma.txt | tr A-Z a-z | tr -sc "a-z0-9" "\n" | sort | uniq | cut -c1 | uniq -c | sort -nr | head -5
763 s
672 c
567 p
554 a
523 d
# note that first uniq is just collapsing repeating words so that each word is considered ONCE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment