From owner-freebsd-bugs Sun Dec 13 21:59:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA01603 for freebsd-bugs-outgoing; Sun, 13 Dec 1998 21:59:17 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from fantomas.fantomas.sk (fantomas.fantomas.sk [195.168.5.189]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA01596 for ; Sun, 13 Dec 1998 21:59:15 -0800 (PST) (envelope-from uhlar@fantomas.sk) Received: (from uhlar@localhost) by fantomas.fantomas.sk (8.8.8/8.8.8/Debian/GNU) id GAA10017 for freebsd-bugs@FreeBSD.ORG; Mon, 14 Dec 1998 06:59:10 +0100 Message-ID: <19981214065910.A9981@fantomas.sk> Date: Mon, 14 Dec 1998 06:59:10 +0100 From: "Matus \"fantomas\" Uhlar" To: freebsd-bugs@FreeBSD.ORG Subject: Re: test -n Mail-Followup-To: freebsd-bugs@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93i In-Reply-To: ; from Andrew Lankford on Sun, Dec 13, 1998 at 02:35:32PM -0500 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? try [ -n "$string" ] && echo yeah should work. -- Matus "fantomas" Uhlar, sysadmin at NETLAB+ Kosice, Slovakia BIC coord for *.sk; admin of netlab.irc.sk; co-admin of irc.felk.cvut.cz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message