uniq

English [ju?ni:k] US [ju?nik]

adj.

??? uniq ?? ???

??: uniq ??? ??? ???? ???? ?? ?? ???? ???? ? ?????.

??: ??uniq [-cdu][-f][-s][-w][--help][--version][?? ??][?? ??]

??? uniq ?? ?

?? testfile? 2??, 5??, 9?? ?? ??? ????. uniq ??? ???? ??? ?? ??? ? ????.

uniq testfile

??? ??? ?? ??? ??? ????.

$ cat testfile      #原有內(nèi)容  
test 30  
test 30  
test 30  
Hello 95  
Hello 95  
Hello 95  
Hello 95  
Linux 85  
Linux 85

???? uniq ?? ??? ? ??? ??? ?? ??? ????.

$ uniq testfile     #刪除重復(fù)行后的內(nèi)容  
test 30  
Hello 95  
Linux 85

??? ???? ???? ???? ?? ???? ?? ?? ??? ?? ?? ?? ?? ??? ?????. ?? ??? ??????.

uniq-c testfile

?? ??? ??? ????.

$ uniq-ctestfile      #刪除重復(fù)行后的內(nèi)容  
3 test 30             #前面的數(shù)字的意義為該行共出現(xiàn)了3次  
4 Hello 95            #前面的數(shù)字的意義為該行共出現(xiàn)了4次  
2 Linux 85            #前面的數(shù)字的意義為該行共出現(xiàn)了2次