Mandriva

Return to the main archive index.

Custom Search

Mandriva Linux Archives: cooker@mandrivalinux.org

Mandriva Linux: cooker@mandrivalinux.org


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


* Todd Lyons <todd@mrball.net> [2007-09-29 15:33 -0700]:
> Andrey Borzenkov wanted us to know:
> 
> >if [ $num = 0 ]; then
> 
> Is that a typo when you pasted?  
> [ $num = 0 ] will always be true.  It should be
> [ $num == 0 ]

No. For '[' (and 'test'), '=' it is:

$ help test | grep -m1 -A1 -w =
        STRING1 = STRING2
                       True if the strings are equal.



Date Index | Thread Index

Looking for a job?



Advertisement (via La Vignette)