I have a file on the following format
id_1,1,0,2,3,lable1 id_2,3,2,2,1,lable1 id_3,5,1,7,6,lable1
and I want the summation of each column ( I
Using awk:
awk
$ awk -F, '{for (i=2;i
This will print the sum of each column (from i=2 .. i=n-1) in a comma separated file followed the value of the last column from the last row (i.e. lable1).