I have file1 (sample):60108903374601724851216010891938160174213128601089199516010891997060111202010660111202010760111202010860111202011360111202011460175472940And file2:60179970001,A60172681920,A60174202041,A60172514180,A60174314679,A60174325306,A60175472940,A60174213128,A60175328984,A60175349857,A60172796759,A60172798922,A60179195129,A60172485121,B60173483126,A60172683175,A60174521828,A60142536314,B60175347909,B60175183031,BI want to merge file1 and file2 with output matching based on the first column as well as shows the second column from file2.Desired output:60172485121,B60174213128,Afile1 has ~80k lines and file2 has 500k lines.Tried using:join -1 1 -2 1 -o 1.1,2.2 file1 file2Am i doing something wrong somewhere? Need help!Thanks!
How to merge two files of different lines and column and output matching lines with colums?
text processing;join
join -t, <(sort file1) <(sort -t, file2)The above does the job.