bug-bash
[Top][All Lists]
Advanced

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

Re: if, -n <string>


From: coubeatczech
Subject: Re: if, -n <string>
Date: Sun, 1 Feb 2009 05:05:35 -0800 (PST)


Jan Schampera wrote:
> 
> coubeatczech wrote:
> 
>> address@hidden:~$ if [ -z $variable ]; then echo true; fi
>> true
>> address@hidden:~$
>> 
>> Can anybody explain to me this behaviour? I would expect not any output
>> in
>> the last command...? The variable is set to zero and there is the
>> condition
>> is still true...?
> 
> http://bash-hackers.org/wiki/doku.php/commands/classictest#number_of_arguments_rules
> 
> You'd need some quoting.
> 
> Jan aka TheBonsai
> 
> 
> 
> 
Thanks, I'm understanding it now.
-- 
View this message in context: 
http://www.nabble.com/if%2C--n-%3Cstring%3E-tp21764081p21774953.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]