I am using all-numeric data, tab-delimited, as input to the following code:
{for (i=1; i<=NF; i++)
sum[i]+=$i
if(NF>maxfld)
maxfld=NF
}
END {for (i=1; i<=maxfld; i++) {
printf("%g",sum[i])
if (i<maxfld)
printf("\t")
else
printf("\n")
}
}
According to the Aho...