I would like to join two files when two columns in each file matches with each other and then produce an output when taking multiple columns.
Like I have file A
1234,ABCD,23,JOHN,NJ,USA
2345,ABCD,24,SAM,NY,USA
5678,GHIJ,24,TOM,NY,USA
5678,WXYZ,27,MAT,NJ,USA
and file B
ABCD,IND,GH,23,PIR,KUM
WXYZ,KKK,YU,27,OPI,UUU
TTTY,TTT,OP,31,IOP,RRR
and I want the output when column 2 and 3 of file A matches with Column 1 and 4 of file B; then produce output like below
fileA.column1,fileA.column3,fileB.column6,fileB.column1,fileA.column2,fileB.column1