I have two files that I am trying to compare, and create a final.txt file with data that exists from both of those files.
File1 - column 1 and File2 - columns 2 contain the value that I need to match between the two files.
So essentially, I am trying to -> take column1 from File1, if there is a match in column2 of file2, then write File1Column1, File1Column2 and File2Column1 to a new file called final.txt.
1000,Brian 1010,Jason 400,Nick
3044 1000 4466 400 1206 1010
Final.txt file to look like
1000,Brian,3044 1010,Jason,1206 400,Nick,4466
I believe I should be able to do this with awk, but for some reason I am really struggling with this one. Any help would be greatly appreciated.