------------------uniq 去重复

uniq    #检查文件中重复出现的行
    -c    #显示输出,并在文本行前加重复出现的次数,但如果重复行不连续,则不认为是重复的行
    -d    #只显示重复出现的行
    -u    #只显示不重复出现的行
uniq -c passwd    #显示重复行的次数
uniq -u passwd    #只显示不重复出现的行
uniq -d passwd    #只显示重复出现的行

猜你喜欢

转载自www.cnblogs.com/fzlsss/p/9668027.html