I have this:
.2 .5
.1 .1
.3 .3
I want two columns of results:
one column for the sum of each row
second column for 1 - the sum of each row when the sum is greater than .5
.7 .3
.2 .2
.6 .4
I know how to get the row sum column:
awk '{for(i=1;i<=NF;i++) t+=$i; print t; t=0}'
not sure how to get the second column (in the same awk one liner if possible)
Any advice is greatly appreciated, thank you!