Hi everybody:
Could anybody tell me how can I do this.
I've two files (file1 & file2) where file1 its last row it has first field value equal that the first row in file2, thyen I want calculate the difference in other fields, and this values apply in file2. This is:
file1:
.............................
.............................
10.87 228.983
14.31 211.306
19.83 214.468
file2 :
19.83 217.83
28.67 231.34
42.74 264.576
.............................
.............................
Then diff=$2(file2)-$2(file1)=217.83-214.468=3.362, then I would like to have this output:
19.83 214.468
28.67 231.34-diff
42.74 264.576-diff
.............................
.............................
This is:
19.83 214.468
28.67 227.978
42.74 261.214
.............................
.............................
Thanks in advance and cheers.
Could anybody tell me how can I do this.
I've two files (file1 & file2) where file1 its last row it has first field value equal that the first row in file2, thyen I want calculate the difference in other fields, and this values apply in file2. This is:
file1:
.............................
.............................
10.87 228.983
14.31 211.306
19.83 214.468
file2 :
19.83 217.83
28.67 231.34
42.74 264.576
.............................
.............................
Then diff=$2(file2)-$2(file1)=217.83-214.468=3.362, then I would like to have this output:
19.83 214.468
28.67 231.34-diff
42.74 264.576-diff
.............................
.............................
This is:
19.83 214.468
28.67 227.978
42.74 261.214
.............................
.............................
Thanks in advance and cheers.