I have file1 likes:
0 AFFX-SNP-000541 NA
0 AFFX-SNP-002255 NA
1 rs12103 0.6401
1 rs12103_1247494 0.696
1 rs12142199 0.7672
And a file2:
0 AFFX-SNP-000541 1
0 AFFX-SNP-002255 1
1 rs12103 0.5596
1 rs12103_1247494 0.5581
1 rs12142199 0.4931
And would like a file3 such that:
0 AFFX-SNP-000541 NA 1
0 AFFX-SNP-002255 NA 1
1 rs12103 0.6401 0.5596
1 rs12103_1247494 0.696 0.5581
1 rs12142199 0.7672 0.4931
Which means to put the 4th column of file2 to file1 by the name of the 2nd column.