linux shell脚本查找重复行/查找非重复行/去除重复行/重复行统计

转自:http://blog.sina.com.cn/s/blog_6797a6700101pdm7.html

去除重复行

sort file |uniq

查找非重复行

sort file |uniq -u

查找重复行

sort file |uniq -d

统计

sort file | uniq -c

去除重复的行,并生成新的文件

sort file |uniq > new_file
posted @ 2015-12-09 17:56  KoMiles  阅读(8689)  评论(0编辑  收藏  举报