Implementação do KISS em awk
:
awk '
FNR == 1 {
n=NF;print;next
}
FNR == 2 || FNR == 3 || FNR == 6 {
for (i=1;i<=NF;i++) a[i]+=$i;
}
FNR == 4 || FNR == 5 || FNR == 7 {
for (i=1;i<=NF;i++) b[i]+=$i
} END {
for (i=1;i<=n;i++) printf("%8s", a[i]); print "";
for (i=1;i<=n;i++) printf("%8s", b[i]); print "";
}
' file