Convert Seconds to Minutes in Terminal on Mac - VicPhanDevOps/mac GitHub Wiki

• Press the command key and spacebar to launch Spotlight Search, type “terminal” and select the “Terminal” application.
image

• Type < seconds variable >=< number of seconds > and press the return key to declare the seconds variable and set it to the desired number of seconds.
image

• Type echo “$< seconds variable > seconds” and press the return key to print the number of seconds to the Terminal.
image

• Type < minutes variable >=$(( $< seconds variable > / 60 )) and press the return key to declare the minutes variable and set it the quotient of dividing the number of seconds by sixty.
image

• Type echo “$< minutes variable > minutes” and press the return key to print the number of minutes to the Terminal.
image

⚠️ **GitHub.com Fallback** ⚠️