Hi,
Code:
#!/bin/bash
awk -F: 'BEGIN { totSecs = 0 }
{ totSecs = totSecs + 3600 * $1 + 60 * $2 + $3 }
END { print "Total number of seconds: " totSecs }
' infile
infile holds the output of the script.
Example run:
Code:
$ cat infile
0:0:35
0:0:36
0:0:28
0:0:37
0:0:43
0:1:2
$ ./total.secs.sh
Total number of seconds: 241
@JimmyKrak: The first three
let statements are missing a closing `
Hope this helps.