uniq command

Check duplicate rows and columns,

$ uniq testfile     #删除重复行后的内容  
test 30  
Hello 95  
Linux 85 
$ uniq -c testfile      #删除重复行后的内容  
3 test 30             #前面的数字的意义为该行共出现了3次  
4 Hello 95            #前面的数字的意义为该行共出现了4次  
2 Linux 85            #前面的数字的意义为该行共出现了2次 
$ sort  testfile1 | uniq
Hello 95  
Linux 85 
test 30

猜你喜欢

转载自blog.csdn.net/qq_43682465/article/details/88637175
今日推荐