Convert Seconds to Minutes in Bash with Visual Studio Code on Mac - VicPhanDevOps/mac GitHub Wiki
• Type < minutes variable >=$(( < seconds > / 60 ))
and press the return key to declare the minutes variable and set to the quotient of the seconds divided by sixty.
•
• Type echo “< message > $< minutes variable > minute(s)”
to print the minutes to the Terminal when the Bash script runs.
•
• Press the command and S keys to save the changes.
•
• Press the command key and spacebar to launch Spotlight, type “terminal” and select the “Terminal” application.
•
• Type ./< path >/< script name >.sh
and press the return key to run the Bash script.
•
• The minutes will print to the Terminal.
•