This is a way to do it using GNU awk where the script is called `script.sh` and the existing total file is called `/tmp/sample.log`:
script.sh|\
cat /tmp/sample.log -|\
awk -F, '{for (f=1;f<=NF;f++) TOT[f]+=$f} END {for (f=1;f
mv -f /tmp/sample1.log /tmp/sample.log
The output from `script.sh` is combined (put as a line under) the existing `sample.log` and these two lines are then summed in `awk` and the result used to replace `sample.log`
This will work with any number of fields (don't have to be consistent). The delimiter is set to be a comma but this could easily be changed.