cat sorttest | sort | uniq -c
sorttest文件内容如下
linux-统计文件中相同行的数量
原文:http://www.cnblogs.com/DengGao/p/sort_uniq.html