On 09/20/2007 07:46 PM, Paul Jarc wrote:
[EMAIL PROTECTED] wrote:
        foo=
        [ -n ${foo} ] && echo true

        Prints "true".
That's the correct behavior.
OK, thanks for the explanation. It makes sense, although I think it's just a little gross. ;-)

To avoid pitfalls like this, always quote variable expansions.  The [[
command is also less tricky.
Yes, I know that, but the person who wrote the code in which I noticed this issue apparently does not :-).

Thanks again,

 jik

Reply via email to