linux - Simple way to convert HH:MM:SS (hours:minutes:seconds.split seconds) to seconds -
What is an easy way to change
00: 20: 40.28
(hh: mm: ss) Is sec with a bash script?
Split seconds can be cut, it is not necessary.
Try awk
. As a bonus, you can keep split seconds.
echo "00: 20: 40.25" | Awk -F: '{Print ($ 1 * 3600) + ($ 2 * 60) + $ 3}' '
Comments
Post a Comment