shell 实现word count

awk '{arr[$2]+=$1}END{for (i in arr) print i,arr[i]}' sort_all.txt | sort -k2nr -g

posted @ 2015-05-16 18:53  wq920  阅读(373)  评论(0)    收藏  举报