On Sat, 2007-07-07 at 23:44 +0200, Yann E. MORIN wrote: > Hello Dallas, > Hello all, > > On Saturday 07 July 2007 23:34, Dallas Clement wrote: > > if [ -n $boot_drive_name ]; then > > retval=0 > > else > > echo "Could not determine boot drive name." > > fi > > I'd suggest either one of: > - enclose the variable between double quotes: "$boot_drive_name" > - use this: [ x$boot_drive_name = x ] > > I would also enclose the variable b=name between curly brackets: > "${boot_drive_name}" > > I would personnally use: > > if [ -z "${boot_drive_name}" ]; then > do_error_out > exit 1 > fi > do_something_usefull > > Regards, > Yann E. MORIN. >
Thank you Yann & Mike: The -n check works when the variable is enclosed in double quotes! :0 Regards, Dallas _______________________________________________ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox