Shell統計詞頻

寫一個 bash 腳本以統計一個文本文件 words.txt 中每個單詞出現的頻率。 爲了簡單起見,你可以假設: words.txt只包括小寫字母和 ' ' 。 每個單詞只由小寫字母組成。 單詞間由一個或多個空格字符分隔。 示例: 假設 words.txt 內容如下: the day is sunny the the the sunny is is 你的腳本應當輸出(以詞頻降序排列): the
相關文章
相關標籤/搜索