[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
if, -n <string>
From: |
coubeatczech |
Subject: |
if, -n <string> |
Date: |
Sat, 31 Jan 2009 06:24:38 -0800 (PST) |
coub@notas:~$ echo $variable
coub@notas:~$ variable=hello
coub@notas:~$ if [ -n $variable ]; then echo true; fi
true
coub@notas:~$ if [ -z $variable ]; then echo true; fi
coub@notas:~$ variable=
coub@notas:~$ if [ -n $variable ]; then echo true; fi
true
coub@notas:~$ if [ -z $variable ]; then echo true; fi
true
coub@notas:~$
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...?
thanks, Jakub
--
View this message in context:
http://www.nabble.com/if%2C--n-%3Cstring%3E-tp21764081p21764081.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.
- if, -n <string>,
coubeatczech <=