On Fri, Jan 14, 2011 at 10:39:53PM -0800, Philip Guenther wrote:
[snip relevant discussion to sidetrack a bit.]
> So, what's the answer for someone wanting to do base conversion? If
> they use sh/ksh, then the answer is $((...)):
>
> $ echo $((0x20))
> 32
> $
>
> csh shmucks^Wusers can use bc or dc for arbitrary base conversion:
>
> % printf 'ibase=16\n%s\n' 20 | bc
> 32
when you are going to use printf anyways, what is wrong with something like
$ printf '%o\n' 0x20
40
$ printf '%d\n' 033
27
$
[end of sidetrack]
> Philip Guenther
Janjaap van Velthooven
-- ________________________________________
/ __/ /_ / ______/ /_ __/ __/ /___ /
/ /_ __/___/_/_ /___ / / __/ /___ / / [email protected]
/___/_/_________/_____/_/_/_/_______/_/_/