对file文件统计单词出现频率:
sed -e 's/\.//g' -e 's/\,//g' -e 's/ /\n/g' "$file" | tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr
sed -e 's/\.//g' -e 's/\,//g' -e 's/ /\n/g' "$file" 去掉句号,逗号,将空格替换为换行符
tr 'A-Z' 'a-z' 将大写转小写
对file文件统计单词出现频率:
sed -e 's/\.//g' -e 's/\,//g' -e 's/ /\n/g' "$file" | tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr
sed -e 's/\.//g' -e 's/\,//g' -e 's/ /\n/g' "$file" 去掉句号,逗号,将空格替换为换行符
tr 'A-Z' 'a-z' 将大写转小写