Sorting by columns

Hi, I have a tab delimited columnar file where I want to remove lines wherever two particular columns match. so for this file, I want to toss the lines where columns 1 and 2 match:

a	a	1	3
a	b	2	4
b	b	3	5

because there are matches column 1 and 2 in lines 1 and 3, I would like a script to provide the following output:

a	b	2	4

Can this be done with a sed one liner? Can anyone help me with this?

THANKS!

awk '$1!=$2' file
1 Like

PERFECT! Thank you!