The shell seems to know when I cut a "number" from a string, that it is indeed not a number. Is there a way to use it as a number? Convert it through another variable assignment to be a number?
secs=$(print $elapsed | cut -c5-6)
where $elapsed might = "14:21:36"
at this point, secs="36"
and temp=$(( $secs * 60 )) won't work.
if first invocation of secs is preceded by,
integer secs
shell converts(?) it to a number when assigned.
Well, whatever it does, it now works in shell arithmetic.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.