I have a sum.csv file I want to sum column 1 contents and column 2 contents and save the results to column 3, let say input is
1,2
3,4
5,6
Required output is
1,2,3
3,4,7
5,6,11
I am using the command awk
awk -F "," '{$3=$1+$2}{print $3}'>>"sum.csv" sum.csv
It will create output in my sum.csv file as
1,2
3,4
5,6
3
7
11
But I want:
1,2,3
3,4,7
5,6,11
How can I get the output please guide me, also it should save on same file.