I would like to get the time from a config file and the multiply it.
When I write the time like 30m it takes case m
and uses 30m. But how I can I do calculations with this value.The case s
is working as it should.
getTimeFromConfig(){
case $timestart in
*s )
echo ${timestart::-1};;
*m )
time = ${timestart::-1}
newtime= $(($time*60));;
*h )
time = ${timestart::-1}
newtime= $(($time*3600));;
esac
}