h=09; m=30;(( tot = 10#$h * 60 + 10#$m )); echo $tot
The number before the `#` is the radix (or base)
The number after the `#` must be valid for the radix
The output is always decimal
You can use a radix of _2 thru 64_ (in GNU bash 4.1.5)
Note that Bash requires a leading minus sign to come before the `10#`, so if your number has one, adding the `10#` prefix directly won't work.
As noted by _enzoyib_ , the old alternative of `$[expression]` is deprecated, so it is better to use the POSIX compliant `$((expr))`
$(( 2#1)) == 1
$((16#F)) == 15
$((36#Z)) == 35
I'm not sure which 'digits' are used after `Z`