[BusyBox] If statements.. using ASH

WILSON,RICH (A-LakeStevens,ex1) rich_wilson at agilent.com
Tue May 21 09:27:03 UTC 2002


Are you saying [ ... ] should work with ash?


BusyBox v0.60.3 (2002.05.02-16:43+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# if [ 2 -eq 3 ]; then
> echo hi
> fi
[: No such file or directory
# if test 2 -eq 3; then
> echo hi
> fi
#

Rich


Rich Wilson
Agilent Technologies
425-335-2245
rich_wilson at agilent.com

> -----Original Message-----
> From: Goetz Bock [mailto:bock at blacknet.de]
> Sent: Tuesday, May 21, 2002 7:56 AM
> To: busybox at busybox.net
> Subject: Re: [BusyBox] If statements.. using ASH
> 
> 
> 
> On Tue, May 21 '02 at 08:48, rich_wilson at agilent.com wrote:
> > Try replacing [ ... ] with test.
> >   if test $# -ge $CMDLINEPARAM
> and add a ;
> 
> if [ $# -ge $CMDLINEPARAM ]; then
> ....
> fi
> 
> but maybe that is only required when you don't have a newline 
> (I'm using
> above syntax with 0.60.3 on my initrd/linuxrc scripts)
> 
> Cu,
>     Goetz.
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox
> 



More information about the busybox mailing list