>Can anyone tell me how, in a script, I can ensure a variable is treated as
>base 10? I've looked at the bash man page, and found it a little (as Anand
>would put it) "hard to parse".
bash$ echo $((10-12))
-2
bash$ echo $((010-07))
1
bash$ echo $((10-07))
3
bash$ echo $((10#10-07))
3
bash$ echo $((10#100-07))
93
bash$ a=100
bash$ echo $((10#$a-07))
93
bash$ echo $((10#`echo 0100`-07))
93
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug