I have two unsorted files, each with two columns. For any line in file1 whose column1 value matches that of any line in file2, but whose column 2 values differ, I want to print the column 1 value and each column 2 value.
If data from column1 in file 1 does not exist in file2 it can be discarded. I do not need to preserve the sort order in the output file.
file1: 2222,b2 4444,d4 1111,a1 3333,c3 5555,e5 file2: 2222,8f 5555,e9 4444,7c 3333,c3 OUTPUT file: 2222,b2,8f 4444,d4,7c 5555,e5,e9