我试图找出输入文件中英文字母表中每个字母的出现频率。我怎样才能在 bash 脚本中做到这一点?
我的解决方案使用grep, sort and uniq.
grep
sort
uniq
grep -o . file | sort | uniq -c
忽略大小写:
grep -o . file | sort -f | uniq -ic