Last active
August 29, 2015 14:01
-
-
Save iziang/a8aec19f76b78053c499 to your computer and use it in GitHub Desktop.
找出以哪个英文字母开头的单词最多
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk -vFS="" '{a[$1]++}END{for (i in a) if(match(i,/[a-z]/)) {b[i]=a[i]+a[toupper(i)];print i","b[i]}}' /usr/share/dict/words|sort -t "," -nrk 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment