Hello all,
I have two files:
file1:
428165.27 5356169.59 128.20 41074
428071.74 5356209.69 128.10 41075
427978.10 5356239.79 128.00 41076
427885.32 5356279.88 127.90 41077
427790.93 5356309.99 127.80 41078
427696.68 5356350.10 127.60 41079
file2:
41074.0 -10.730 2.151377
41075.0 -10.811 2.166259
41077.0 -10.977 2.183353
41078.0 -11.060 2.198520
41079.0 -11.143 2.213687
I want to write a file which will
i.) Compare 4th column of "file1" with first column of "file2",
ii.)Ignore the unmatched lines of "file1"
and
iii.) Print the output in a separate file with the third column of "file2" as the fifth column of "file1".
So my output should look like this:
428165.27 5356169.59 128.20 41074 2.151377
428071.74 5356209.69 128.10 41075 2.166259
427885.32 5356279.88 127.90 41077 2.183353
427790.93 5356309.99 127.80 41078 2.198520
427696.68 5356350.10 127.60 41079 2.213687
Thanks in advance.
rkdash
I have two files:
file1:
428165.27 5356169.59 128.20 41074
428071.74 5356209.69 128.10 41075
427978.10 5356239.79 128.00 41076
427885.32 5356279.88 127.90 41077
427790.93 5356309.99 127.80 41078
427696.68 5356350.10 127.60 41079
file2:
41074.0 -10.730 2.151377
41075.0 -10.811 2.166259
41077.0 -10.977 2.183353
41078.0 -11.060 2.198520
41079.0 -11.143 2.213687
I want to write a file which will
i.) Compare 4th column of "file1" with first column of "file2",
ii.)Ignore the unmatched lines of "file1"
and
iii.) Print the output in a separate file with the third column of "file2" as the fifth column of "file1".
So my output should look like this:
428165.27 5356169.59 128.20 41074 2.151377
428071.74 5356209.69 128.10 41075 2.166259
427885.32 5356279.88 127.90 41077 2.183353
427790.93 5356309.99 127.80 41078 2.198520
427696.68 5356350.10 127.60 41079 2.213687
Thanks in advance.
rkdash