I have string variables MIN
and SEC
(minute and seconds):
MIN="1"
SEC="34"
I want to do calculations on these:
TOTSEC = MIN*60 + SEC
I tried:
expr $SEC + $MIN * 60
Result:
expr: non-numeric argument
Let it be known I am running busybox
on a custom microcomputer and so have no access to bash
, bc
, and that other solution provides.
*
i.e.expr $SEC + $MIN \* 60