Solved! Go to Solution.
>john: typeset -Z2 i=01
>is to define a two-field integer, where a one digit number is preceded by zero
Be very careful about using this trick. This caused errors for set_parms for the years 08 and 09:
http://h30499.www3.hp.com/t5/System-Administration/Change-the-System-Date-and-Time-in-11-31/m-p/4150450
CURRENT=$(($CURRENT + 1))
You can simplify this to:
(( CURRENT += 1 ))
And if you want performance add at the top:
typeset -i CURRENT
>but how would I get the output in hexadecimal?
A real shell will allow you to print in hex with:
$ typeset -i16 CURRENT=20; echo $CURRENT
16#14