How to Convert Seconds to Minutes in BASH

This is how to convert seconds into HH:MM:SS in bash:
$ date -d '1970-01-01 100 sec' +'%H:%M:%S'
00:01:40

This entry was posted in Bash. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>