1. shell 中字典的用法示例, 数组用法同字典
2. 以上使用 sell 配合字典实现的功能, 使用 awk 能轻松搞定, 如下:
awk '{print $2}' file.txt | sort | uniq -c # -c 表示统计每个唯一字符的个数
来源: http://www.bubuko.com/infodetail-3341939.html