The following lines sum numbers located in the row #2 and row #3 , row #4 and row #5, row #6 and row #7 and so on (so, sum in a consecutive way).
awk ' NR==1{$1=$1; print; next} !(NR%2){split($0,a);print; next} {for(i=1;i<=NF;i++) $i+=a[i]}1' file
Well , I am trying to "generalize" the previous code, so I need to do something to sum whatever rows, for example what I need to do to obtain a sum like this:
row #2 + row #3 + row #4 + ... + row #10 + row #14 + row #15 + row #19
row #1 + row #11 + row #12 + row #13 + row #16 + ... +row #18 + row #20