Joel Hammer wrote:
I understand that bash will do arithmetic in octal if you prefix the
constant with 0. So:
a=05
b=017
c=$((a*b))
echo $c
yields
75
This is the correct answer, but it is in decimals, not octals.
Is there a way to make echo display octal?
Thanks, Joel



More arithmetic?


echo $((8#$c*1)) gives 61

Tom Wekell

_______________________________________________
Linux-users mailing list
[EMAIL PROTECTED]
Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users

Reply via email to