printf "dec(%d) hex(%x)", "65", "0x41"; Argument "0x41" isn't numeric in printf at -e line 2. dec(65) hex(0) # vs. shell: > printf "dec(%d) hex(0x%08x)\n" "65" "0x41" dec(65) hex(0x00000041)