我有文件,這看起來是這樣,(可以有更多的行或列):巴什 - 比較行然後打印只是原始行
dif-1-2-3-4.com 1 1 1
dif-1-2-3-5.com 1 1 2
dif-1-2-4-5.com 1 2 1
dif-1-3-4-5.com 2 1 1
dif-2-3-4-5.com 1 1 1
而且我想這些數字比較:
1 1 1
1 1 2
1 2 1
2 1 1
1 1 1
並打印那些不重複的行,所以我得到這樣的:
dif-1-2-3-4.com 1 1 1
dif-1-2-3-5.com 1 1 2
dif-1-2-4-5.com 1 2 1
dif-1-3-4-5.com 2 1 1
你寫*可以有更多的列或行*。可以在那裏,比方說,與數字比較15個領域? – RomanPerekhrest
允許排序,如'sort -k2 files | uniq -f1'? –
是的,@RomanPerekhrest,可以有更多的領域進行比較,而不只是數字1或2. –