Re: if, -n

2009-02-01 Thread coubeatczech
Eric Blake wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > According to coubeatczech on 1/31/2009 7:24 AM: >> c...@notas:~$ variable= >> c...@notas:~$ if [ -n $variable ]; then echo true; fi >> true > > This is equivalent to 'if

Re: if, -n

2009-02-01 Thread coubeatczech
Jan Schampera wrote: > > coubeatczech wrote: > >> c...@notas:~$ if [ -z $variable ]; then echo true; fi >> true >> c...@notas:~$ >> >> Can anybody explain to me this behaviour? I would expect not any output >> in >> the last comma

if, -n

2009-01-31 Thread coubeatczech
c...@notas:~$ echo $variable c...@notas:~$ variable=hello c...@notas:~$ if [ -n $variable ]; then echo true; fi true c...@notas:~$ if [ -z $variable ]; then echo true; fi c...@notas:~$ variable= c...@notas:~$ if [ -n $variable ]; then echo true; fi true c...@notas:~$ if [ -z $variable ]; then ech