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.
image

• Type echo “< message > $< minutes variable > minute(s)” to print the minutes to the Terminal when the Bash script runs.
image

• Press the command and S keys to save the changes.
image

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

• Type ./< path >/< script name >.sh and press the return key to run the Bash script.
image

• The minutes will print to the Terminal.
image

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