Hi,
I do have a small problem to replace a key in a file with a a value set in a second file, for example:
file1:
x1 x2 x3 x4 x5
4521 20 0 7 912
4521 30 1 8 483
file2:
y1 y2 y3 y4 y5
tt1 4521 0 30 ttx
tt1 4521 1 20 tty
I want to replace the key y3 in file2 with the value set in column x3 of file1 where x1 = y2 and x2 = y4.
Both files are sorted.
The result should be:
y1 y2 y3 y4 y5
tt1 4521 0 20 ttx
tt1 4521 1 30 tty
Can any body help,
Thanks in advance
I do have a small problem to replace a key in a file with a a value set in a second file, for example:
file1:
x1 x2 x3 x4 x5
4521 20 0 7 912
4521 30 1 8 483
file2:
y1 y2 y3 y4 y5
tt1 4521 0 30 ttx
tt1 4521 1 20 tty
I want to replace the key y3 in file2 with the value set in column x3 of file1 where x1 = y2 and x2 = y4.
Both files are sorted.
The result should be:
y1 y2 y3 y4 y5
tt1 4521 0 20 ttx
tt1 4521 1 30 tty
Can any body help,
Thanks in advance