Not sure at all that the following is even possible to do with awk, but...
I have two files file1 and file2 with to columns x and y in both.
The file1 is "base" and I want to compare column x from file2 to file1 and then print only those lines from file2 that are found also from file1. (where x2 == x1)
Problem is also that the columns aren't in the same order.
file1 file2
x1 y1 x3 y13
x2 y2 x1 y11
x3 y3 x4 y14
Print: x1 y11
x3 y13
I have two files file1 and file2 with to columns x and y in both.
The file1 is "base" and I want to compare column x from file2 to file1 and then print only those lines from file2 that are found also from file1. (where x2 == x1)
Problem is also that the columns aren't in the same order.
file1 file2
x1 y1 x3 y13
x2 y2 x1 y11
x3 y3 x4 y14
Print: x1 y11
x3 y13