TalkRS Note however that expr and format in an interactive tclsh, or an interactive console in any Tk app, can do these tasks pedestrianly, which I often use, instead of bothering to search for (or write) a tool:
% expr 0x4711 ;# hex to dec: just prefix 0x 18193 % expr 01234567 ;# octal to dec: just prefix a zero (while the feature is still there :) 342391 % format %o 0x4711 ;# any to oct/hex, use % format 43421
Setok The biggest problem for me is that they can't handle binary numbers. The C code for the above is almost as simple as what you're doing. It's just handy to have as a binary in my path.