Within a shell, what is the difference between [ -n undefinedString ] and [ 
-n "$undefinedString" ] ?
With bash I get:

    $ unset undefinedString
    $ [ -n undefinedString ]  &&  printf "$undefinedString" | od -c
    0000000
    $ [ -n "$undefinedString" ]  &&  printf "$undefinedString" | od -c
    $ [ -z "$undefinedString" ]  &&  printf "$undefinedString" | od -c
    0000000


I mean, shouldn't [ -n undefinedString ], which I guess is without shell 
expansion, give an error?  Clearly
it is an empty string.

  I think I am confusing various terms.  An explanation, perhaps by using the 
concept of C like strings,
might be helpful.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1316275876.75458.yahoomailclas...@web120706.mail.ne1.yahoo.com

Reply via email to