From owner-freebsd-bugs Sun Dec 13 11:35:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA00291 for freebsd-bugs-outgoing; Sun, 13 Dec 1998 11:35:36 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from library.rcpl.org (library.rcpl.org [199.72.201.50]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id LAA00285 for ; Sun, 13 Dec 1998 11:35:35 -0800 (PST) (envelope-from arlankfo@141.com) Received: from 141.com (unverified [199.72.201.49]) by library.rcpl.org (EMWAC SMTPRS 0.83) with SMTP id ; Sun, 13 Dec 1998 14:37:36 -0500 Message-ID: To: freebsd-bugs@FreeBSD.ORG Subject: test -n Date: Sun, 13 Dec 1998 14:35:32 -0500 From: Andrew Lankford Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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