Date: Sun, 13 Dec 1998 14:35:32 -0500 From: Andrew Lankford <arlankfo@141.com> To: freebsd-bugs@FreeBSD.ORG Subject: test -n Message-ID: <B0000095464@library.rcpl.org>
next in thread | raw e-mail | index | archive | help
I have FreeBSD 2.2.5 installed on my computer, and I find that the syntax for "test" or "[" always is a major pain. According to the man page (for CURRENT as well as 2.2.5) "test -n $string" will be TRUE if $string is NOT of zero length. # set string="fred" # echo $string fred # [ -n $string ] && echo yeah yeah ...No surprise there, however.... # set string="" # [ -n $string ] && echo yeah yeah # Am I overlooking something (I'm using tcsh, but it does the same thing in Bourne shell), or is this a bug? Thanks Andrew Lankford To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B0000095464>