[BusyBox] If statements.. using ASH

rich_wilson at agilent.com rich_wilson at agilent.com
Tue May 21 08:50:04 UTC 2002


Try replacing [ ... ] with test.
  if test $# -ge $CMDLINEPARAM

Rich

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

> -----Original Message-----
> From: KrutAw at aol.com [mailto:KrutAw at aol.com]
> Sent: Tuesday, May 21, 2002 6:02 AM
> To: busybox at busybox.net
> Subject: [BusyBox] If statements.. using ASH
> 
> 
> I'm currently unable to run an if statement with busybox 
> 0.60.3 compiled with 
> uclibc.
> 
> Here's an example of the if statement I'm trying to run in my 
> bash script:
> 
> CMDLINEPARAM=1
> if [ $# -ge $CMDLINEPARAM ]
> then 
>        NAME=$1
> else
>        NAME="blah"
> fi
> 
> 
> What am I doing wrong here?
> 
> Thanks,
> 
> Andy Kruta CNA, A+, Net+
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox
> 



More information about the busybox mailing list