in reply to Re: Incrementing only the masked bits (sure)in thread Incrementing only the masked bits
Use:
printf "0x%08.8x\n", (~$val & $mask); [download]
to count up.