[BusyBox] modified libbb/arith.c -- size reduction (30%) and bug fix
Aaron Lehmann
aaronl at vitelus.com
Sat Aug 25 21:28:23 UTC 2001
On Sat, Aug 25, 2001 at 04:22:43PM -0600, Manuel Novoa III wrote:
> > I already long think, whether it is necessary to add to this module an
> > opportunity of work
> > with variables with standart syntax which does not demand for arithmetic
> > operations of
> > the symbol '$'? ( echo $((a+b)) eq echo $(($a+$b)) ) ...
>
> Perhaps arith() could be passed a function pointer for a function that
> returns the numeric value of the variable name passed? The modifications
> arith() would need to handle $varname wouldn't be difficult in that case.
Eh?
$ ./busybox ash
BusyBox v0.60.0 (2001.08.22-00:05+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
$ foo=1
$ bar=2
$ echo $(($foo+$bar))
3
$
More information about the busybox
mailing list