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.
If you are processing a time from ps, mind you that the format 2-18:01 is also possible for 2 days, 19 hours, 1 minute. In that case you'll want to checkout: Parse ps' "etime" output and convert it into seconds
ps
2-18:01