更新时间:2022-02-14 06:50:58
您可以尝试执行此操作,但是如果文件很大,请小心,因为它将值保留在内存中.
You can try this but be careful if the file is huge as it keeps the values in memory.
awk -F, '!($1 FS $2 in dup){dup[$1 FS $2]=dup[$2 FS $1]; print}' <file>
相同的想法:
awk -F, '!(($1 FS $2 in dup)||($2 FS $1 in dup)){dup[$1 FS $2]; print}' <file>