Out of time at the moment---but here is my hunch of how to do this:
This is only pseudocode and may still have some bugs.....
Code:
initialize the time stamp (this requires reading the first line only---I'm assuming that "while read" will still start at the beginning.)
while read; do
initialize variable to zero
test current line to see if time stamp has changed---
no---accumulate the total value into variable
continue the loop (ie branch to "while")
yes---output the time stamp and the variable to a file (see later)
done (branch to while automatically) <your_data_file > your_output_file
You should wind up with a file looking like this:
Code:
time stamp 1 total
time stamp 2 total
etc.