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
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
thanks mjf it works