Total of 5th column using awk or any other utility in UNIX??

Hi I have this file which contains

Al,AADESH,id1_0,23,2013-01-28,2,2			
Al,AADESH,id1_0,23,2013-01-29,4,4			
Al,AADESH,id1_0,23,2013-01-30,2,1			
Al,AADESH,id1_0,31,2013-01-29,1,1			
Al,AESH,id1_0,31,2013-01-31,2,2			
Al,AESH,id2_2,23,2013-01-29,1,1			
Al,AESH,id2_2,31,2013-01-31,1,1			
Al,AESH,id2_3,31,2013-01-29,1,1			

[/CODE]

I want to find the sum of the 5th column...

5th column is date! How do you want to sum the 5th column?

sorry 6th column..... :stuck_out_tongue: i counted wrong...

awk -F, '{ s+=$6 } END { print s }' file
1 Like

hey the same issue persists

how do i find the total of 6th and 7th column simultaneously??

awk -F, '{ total += $6 total1 += $7 }; END { print total total1 }'

[/CODE] is not working.............

Put a semicolon between the two commands.