Hi,
I have a text file like this
6.0000E-02 0.00000E+00 0.0000 0.00000E+00 0.0000
7.0000E-02 5.00000E-10 1.0000 5.00000E-10 1.0000
8.0000E-02 3.00000E-09 0.4082 3.00000E-09 0.4082
9.0000E-02 3.50000E-09 0.3780 3.50000E-09 0.3780
1.0000E-01 1.00000E-09 0.7071 1.00000E-09 0.7071
having 2*n+1 columns and m rows
I would like to obtain a file with one column containing in each row the following formula for that row:
col(2)*col(3)+col(4)*col(5)+col(6)*col(7)+...
Is there a way to do this with awk?
Many thanks