Using awk, remove lines with duplicate pair of columns in different indexes

Viewed 195

Given the following two lines:

foo1 foo2 foo3 foo4
foo3 foo4 foo1 foo2

Line 2 is a duplicate as its pair of columns 1 and 2 are equal to columns 3 and 4 in line 1.

What's the shortest way to remove the second line using awk?

2 Answers
Related