Date: Sun, 13 Dec 1998 21:26:18 +0100 (CET) From: List User <listuser@netspace.net.au> To: freebsd-bugs@FreeBSD.ORG Message-ID: <199812132026.VAA02691@doorway.home.lan>
next in thread | raw e-mail | index | archive | help
Newsgroups: freebsd.bugs Path: root From: Andrew Lankford <arlankfo@141.com> Subject: test -n Received: from 141.com (unverified [199.72.201.49]) by library.rcpl.org (EMWAC SMTPRS 0.83) with SMTP id <B0000095464@library.rcpl.org>; Sun, 13 Dec 1998 14:37:36 -0500 To: freebsd-bugs Sender: owner-freebsd-bugs@FreeBSD.ORG Organization: Private News Host Message-ID: <B0000095464@library.rcpl.org> X-Uidl: 5a778e72b4f8cc8bb968c28acb61d338 X-Loop: FreeBSD.org Date: Sun, 13 Dec 1998 19:35:32 GMT 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 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?199812132026.VAA02691>