From owner-freebsd-questions@FreeBSD.ORG Mon Jun 10 21:47:26 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 544BCEF3; Mon, 10 Jun 2013 21:47:26 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 23FDA1317; Mon, 10 Jun 2013 21:47:25 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.15]) by ltcfislmsgpa03.fnfis.com (8.14.5/8.14.5) with ESMTP id r5ALlIot004083 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 10 Jun 2013 16:47:25 -0500 Received: from dtwin (10.242.182.25) by smtp.fisglobal.com (10.132.206.15) with Microsoft SMTP Server (TLS) id 14.2.309.2; Mon, 10 Jun 2013 16:47:18 -0500 From: Sender: Devin Teske To: "'jb'" , 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> In-Reply-To: Subject: RE: Bourne shell "if" syntax Date: Mon, 10 Jun 2013 14:45:46 -0700 Message-ID: <124a01ce6623$de03c2c0$9a0b4840$@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Content-Language: en-us Thread-index: AQKqCa+a9hyR0ot3Jqq7BhaQloss/QGZ464NAYNXZdYBptsxcwJq94O4Af4O1G0C2b9I1pcX/QvQ X-Originating-IP: [10.242.182.25] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8626, 1.0.431, 0.0.0000 definitions=2013-06-10_05:2013-06-10,2013-06-10,1970-01-01 signatures=0 Cc: Devin Teske 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 21:47:26 -0000 > -----Original Message----- > From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd- > questions@freebsd.org] On Behalf Of jb > Sent: Monday, June 10, 2013 12:53 PM > To: freebsd-questions@freebsd.org > Subject: Re: Bourne shell "if" syntax > > 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 > The above link reinforces what I mentioned earlier as the divide. Differs based on whether "[" is a built-in versus /usr/bin/[ -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.