I have a file that contains 87 lines, each with a set of coordinates (x & y). This file looks like:
1 200.3 -0.3
2 201.7 -0.32
...
87 200.2 -0.314
I have another file which contains data that was taken at certain of these 87 positions. i.e.:
37 125
42 175
86 142
where the first number is the line number of the coordinates in the other file. Is there a way to get an output like:
37 201.2 -0.324 125
42 200.1 -0.311 175
86 203.0 -0.35 142
where I am pulling columns 2 & 3 from the first file with 87 lines, and column 4 from the second file (in this example with 3 lines but I want to be able to do more)?
I've tried using join to do this but it doesn't bring up anything!
Thanks!