awk experts,
I have in put file with time stamp followed by "," separated data. same patern continues. The output need time stamp in first columns and data total in 2nd columns.
Input file
T 9:15
d0,1,3,3
d1,2,1,1
d2,3,1,5
e1,1,1,1
T 9:30
d0,1,1,1
d1,2,3,2
d3,1,2,1
e1,2,1,2
Output:
Time,Total
T 9:15,11
T 9:30,10
Select the time stamp and use it for each line until next time stamp. Total is the total of "d" lines for next two columns.