From owner-freebsd-bugs Mon Dec 14 01:25:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA01163 for freebsd-bugs-outgoing; Mon, 14 Dec 1998 01:25:46 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from mailb.telia.com (mailb.telia.com [194.22.194.6]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA01091 for ; Mon, 14 Dec 1998 01:25:36 -0800 (PST) (envelope-from listuser@netspace.net.au) Received: from d1o1.telia.com (root@d1o1.telia.com [195.67.240.241]) by mailb.telia.com (8.8.8/8.8.8) with ESMTP id KAA24598 for ; Mon, 14 Dec 1998 10:25:31 +0100 (CET) Received: from doorway.home.lan (t6o1p48.telia.com [195.67.241.108]) by d1o1.telia.com (8.8.8/8.8.5) with ESMTP id KAA10808 for ; Mon, 14 Dec 1998 10:25:30 +0100 (CET) Received: (from listuser@localhost) by doorway.home.lan (8.8.8/8.8.7) id JAA10623 for freebsd-bugs@FreeBSD.org; Mon, 14 Dec 1998 09:28:24 +0100 (CET) (envelope-from listuser) Date: Mon, 14 Dec 1998 09:28:24 +0100 (CET) From: List User Message-Id: <199812140828.JAA10623@doorway.home.lan> To: freebsd-bugs@FreeBSD.ORG Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Newsgroups: freebsd.bugs Path: root From: "Matus \"fantomas\" Uhlar" Subject: Re: test -n Content-Type: text/plain; charset=us-ascii 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 To: freebsd-bugs Sender: owner-freebsd-bugs@FreeBSD.ORG Mail-Followup-To: freebsd-bugs@FreeBSD.ORG Organization: Private News Host Message-ID: <19981214065910.A9981@fantomas.sk> X-Mailer: Mutt 0.93i References: X-Uidl: f13f2368a24a31dfcd76e8f928d038d4 X-Loop: FreeBSD.org Mime-Version: 1.0 In-Reply-To: ; from Andrew Lankford on Sun, Dec 13, 1998 at 02:35:32PM -0500 Date: Mon, 14 Dec 1998 05:59:10 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? 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message