Append result in the same line

I have a line like below

a,blank,12,24

I want to add (12+24) at the end of the line or any where in the same line line

output:
a,blank,12,24,36

Here is one way:

echo 'a,blank,12,24' | awk -F, '{print $0 "," $3+$4}'
a,blank,12,24,36
1 Like

thanks mjf it works