sectools Convert between bases (e.g.: HEX to DEC) printf "%x\n" 4095 # DEC to HEX printf "%d\n" 0x1234 # HEX to DEC Ref: https://www.cyberciti.biz/faq/linux-unix-convert-hex-to-decimal-number/