I have two text files:
f1
A B
sam 23
dam 90
f2
G A K
43 DQF 65
54 sam 90
56 jay 89
67 dam 43
45 fds 78
I would like to add to f1 cols G and K but only for names that I have in A
desired output:
A B G K
sam 23 54 90
dam 90 67 43