[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug in /bin/test ?
From: |
Emanuele Tomasi |
Subject: |
bug in /bin/test ? |
Date: |
Sat, 25 Aug 2007 10:40:42 +0200 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.0.4) |
Hi,
is it a bug of /bin/test? Please see this output:
1)
---------------------------------------------------
$> which test
/bin/test
$> casa=
$> /usr/bin/test -n $casa && echo yes || echo no
yes
$> /usr/bin/test $casa && echo yes || echo no
no
----------------------------------------------------
but, from test(1):
...
-n STRING
the length of STRING is nonzero
STRING equivalent to -n STRING
...
2)
again (with the same initializing of casa):
---------------------------------------------------
$> /usr/bin/test -n $casa && echo yes || echo no
yes
$> /usr/bin/test -z $casa && echo yes || echo no
yes
---------------------------------------------------
but, from test(1):
...
-n STRING
the length of STRING is nonzero
...
-z STRING
the length of STRING is zero
best regards,
Emanuele
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
- bug in /bin/test ?,
Emanuele Tomasi <=