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
原文地址:https://www.cnblogs.com/wangkongming/p/5033676.html