What\'s an easy way to convert 00:20:40.28 (HH:MM:SS) to seconds with a Bash script?
00:20:40.28
Split seconds can be cut out, it’s not essential.
with the shell,
#!/bin/bash d="00:20:40.28" IFS=":" set -- $d hr=$(($1*3600)) min=$(($2*60)) sec=${3%.*} echo "total secs: $((hr+min+sec))"