From owner-freebsd-questions@FreeBSD.ORG Mon Jun 10 19:53:03 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 46F29F79 for ; Mon, 10 Jun 2013 19:53:03 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 09B5F1E02 for ; Mon, 10 Jun 2013 19:53:02 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Um895-0006kQ-SZ for freebsd-questions@freebsd.org; Mon, 10 Jun 2013 21:52:56 +0200 Received: from 79-139-19-75.prenet.pl ([79.139.19.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Jun 2013 21:52:51 +0200 Received: from jb.1234abcd by 79-139-19-75.prenet.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Jun 2013 21:52:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: jb Subject: Re: Bourne shell "if" syntax Date: Mon, 10 Jun 2013 19:52:37 +0000 (UTC) Lines: 19 Message-ID: References: <51b620a6.42f.2b6a6400.5605dcf0@go2france.com> <121701ce660c$9a9aa5b0$cfcff110$@freebsd.org> <51B62389.5000500@tundraware.com> <121b01ce660e$2abae5f0$8030b1d0$@freebsd.org> <51B62622.1070201@tundraware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 79.139.19.75 (Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2013 19:53:03 -0000 Michael Sierchio tenebras.com> writes: > ... > Right. Many scripts seem to assume that sh is bash, and that's > certainly not the case here. > > if [ "x$BLAH" = "x" ]; then > > is the most reliable and portable way of determining if it's a string > of zero length. Actually this trick is not needed any more (it has not been required for long time because the problem was fixed). http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2012-August/004275.html jb