I have the following table:
hitA queryA
hitB queryA
hitC queryB
hitC queryC
hitD queryD
and I would like to filter out rows that have a duplicate in either column 1 or 2. My expected output is:
hitD queryD
because hitD only occurs once in column 1 and queryD only occurs once in column 2.
I tried the following:
sort -k 2,2 -u
sort -k 1,1 -u
but this only gives me unique values in either of the columns.