In a UNIX shell script, what can I use to convert decimal numbers into hexadecimal? I thought od would do the trick, but it\'s not realizing I\'m feeding it ASCII represent
In my case, I stumbled upon one issue with using printf solution:
$ printf "%x" 008 bash: printf: 008: invalid octal number
The easiest way was to use solution with bc, suggested in post higher:
$ bc <<< "obase=16; 008" 8