I have 2 column file like: $ cat data a4 b1 a4 c2 a4 b4 z4 c2 I want to match both columns such as if (column1 = a4 and column2 = b1) OR (column1 = a4 and column2 = c2) then the output in column3 should be (DESIRED OUTPUT): a4 b1 matched a4 c2 matched a4 b4 - z4 c2 - so I tried to incorporate m...