uniq: 將重複的文字予以刪除
刪除重複行
uniq
計算重複行的個數 (會印出每一行出現的個數)
uniq -c example.txt
輸出沒有重複的行
uniq -u example.txt
輸出重複的行
uniq -d example.txt
不區分大小寫
uniq -i example.txt
參考資料:
uniq: 將重複的文字予以刪除
刪除重複行
uniq
計算重複行的個數 (會印出每一行出現的個數)
uniq -c example.txt
輸出沒有重複的行
uniq -u example.txt
輸出重複的行
uniq -d example.txt
不區分大小寫
uniq -i example.txt
參考資料: