rhnaeco
Technical User
- Aug 11, 2005
- 45
I'm not sure whether this is a sed or awk solution:
i have a file like this :
12.4277 -12.9941
12.4277 -13.2078
12.4278 -13.3616
12.4278 -13.3616
.... .... ....
i would like to subract the values in $3 from each other, e.g.
-13.2078 - -12.9941 = column in new file
-13.3616 - -13.2078 = same column
so that my results look like:
-0.2137
-0.1538
0
this column i would like to sum
e.g -0.3675
any help would be greatly apprieciated
thanks
rhnaeco
i have a file like this :
12.4277 -12.9941
12.4277 -13.2078
12.4278 -13.3616
12.4278 -13.3616
.... .... ....
i would like to subract the values in $3 from each other, e.g.
-13.2078 - -12.9941 = column in new file
-13.3616 - -13.2078 = same column
so that my results look like:
-0.2137
-0.1538
0
this column i would like to sum
e.g -0.3675
any help would be greatly apprieciated
thanks
rhnaeco