[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

[LI] Is there a bug in Bash2



Dear Linux users,
I found that the command " test -n $var " ( to test whether the string variable is non -empty ) does not work. The expression " [ -n $var ] " where var is a string variable always evaluates true . But the complementary
" test -z $var " works as expected . Is this a bug in the shell or am I doing something wrong ? Please help.

Yours,
Soumava
-------------------------------------------------------------------- The Linux India Mailing List Archives are now available. Please search the archive at http://lists.linux-india.org/ before posting your question to avoid repetition and save bandwidth.