hi,
i have a file like this :
test 1: 1110 1 4 faults detected
G17 /0
G11 /1
G9 /0
G8 /1
test 2: 1111 1 0 faults detected
test 3: 0011 1 3 faults detected
G5 /0
G10 /0
G14 /1
test 4: 0111 1 5 faults detected
G15 /1
G6 /1
G11->G6 /1
G12 /1
G1 /0
test 5: 1110 1 0 faults detected
test 6: 1101 1 0 faults detected
test 7: 1011 1 0 faults detected
test 8: 0100 1 0 faults detected
test 9: 0110 1 0 faults detected
test 10: 0011 0 10 faults detected
G17 /1
G12->G15 /0
G3 /0
G11 /0
G10 /1
G14->G10 /0
G14 /0
G12 /0
G2 /0
G13 /1
test 11: 1111 1 1 faults detected
G14->G8 /1
test 12: 1101 1 0 faults detected
test 13: 1011 1 0 faults detected
test 14: 1111 1 0 faults detected
test 15: 0110 1 0 faults detected
and i want to sum every number before "faults detected". for example: 4+3+5+10+1.
hwo can i do this?