Recently I had a need to calculateĀ seconds out of minutes and seconds. The BASH script below will take two integer arguments separated by a space and return a value in seconds.
min-sec-to-seconds.sh
#!/bin/bash seconds=$[60*$1+$2] echo $seconds
Recently I had a need to calculateĀ seconds out of minutes and seconds. The BASH script below will take two integer arguments separated by a space and return a value in seconds.
#!/bin/bash seconds=$[60*$1+$2] echo $seconds