[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Bug in test [ $n != 0 ]; then



On Sat, 12 Jun 2004 11:07:40 -0600
clemens dwf com wrote:

> I have a script here that ran fine up thru Fc2T1, but 
> test (I assume) is now complaining.
> 
> The error is:
>     ./update2.sh: line 126: [: too many arguments
> 
> The line in question is:
>     if [ $n9 -ne 0 ]; then
> 
> I tried ${n9} but got the same error.
> 
> I dont see any error, and it has worked up to now, anyone else
> see a problem?

Reg,

Likely $n9 is being expanded to something with a whitespace in it
and then being interpreted as multiple arguments, try:

if [ "$n9" -ne 0 ]; then

Cheers,
Sean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]