I have two files, note that I’d like to use the last column like a reference:
1) First file:
[robert@10-2Fontes]$ head rxid
0.086297 id 0 udp 767 0
0.091866 id 1 udp 760 1
0.097236 id 2 udp 733 2
0.103616 id 3 udp 869 3
0.110956 id 4 udp 1000 4
0.459247 id 9 udp 754 54
Note: this file have 64196 lines.
2) Second File (reference):
[robert@10-2Fontes]$ head pumba.txt
0.086297 0
0.091866 1
0.097236 2
0.103616 3
0.110956 4
0.118285 5
0.125615 6
0.130077 7
0.459247 54
This file is a index and have 64677 lines,
3) I would like a 3rd file, where it search the correspondent number in file 2 and put the number related in the last column of the first file. Something like that:
0.086297 id 0 udp 767 0 0.086297
0.091866 id 1 udp 760 1 0.091866
0.097236 id 2 udp 733 2 0.097236
0.103616 id 3 udp 869 3 0.103616
0.110956 id 4 udp 1000 4 0.110956
...
how about: