[BusyBox] ash arith error?

Chun Kit Edwin Lau edwin at micronedge.com
Fri Mar 18 18:54:14 UTC 2005


Hi Vodz,

On Fri, 2005-03-18 at 20:16 +0300, Vladimir N. Oleynik wrote:
> Chun,
> 
> > 	I am using the simple.script from udhcpc's example to get an IP.  When
> > the script is run, ash give me an error
> > 
> > /usr/share/udhcpc/simple.script: 38: arith: syntax error: "metric++"
> > 
> > First of all, I think the line number is wrong.  
> 
> May be. It`s new feature, and have problems.
> 
> > Second, I checked the
> > syntax for ++ and it seems ok.  BTW, I am a ash/bash script newbie.
> 
> Can I see real line with this problem?
> 

metric=0
for i in $router ; do
	route add default gw $i dev $interface metric $((metric++))
done
---------------------------------------------------------^

I have also attached the script. Thanx

> 
> --w
> vodz
> 
> 

Edwin Lau
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple.script
Type: application/x-shellscript
Size: 834 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20050318/fae9d60b/attachment.bin 


More information about the busybox mailing list