Hi everybody:
I have awk script which calcule the total sum of each column like this:
so I would like reduce the line with a simple line, for example this sum into a for stament.
Any suggestion.
Thanks in advance.
I have awk script which calcule the total sum of each column like this:
Code:
awk 'BEGIN{OFS=" };{s2+=$2;s3+=$3;s4+=$4;s5+=$5;s6+=$6;s7+=$7;s8+=$8;s9+=$9;
s10+=$10;s11+=$11;s12+=$12}; END{print s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12}' file1 > file2.
Any suggestion.
Thanks in advance.