shell script: summerize the frequency of words in one file