From owner-freebsd-questions@FreeBSD.ORG Mon Jan 12 03:41:34 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6F331065673 for ; Mon, 12 Jan 2009 03:41:34 +0000 (UTC) (envelope-from jeffrey@goldmark.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8BAAD8FC1C for ; Mon, 12 Jan 2009 03:41:34 +0000 (UTC) (envelope-from jeffrey@goldmark.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 10FB420A05A; Sun, 11 Jan 2009 22:41:34 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 11 Jan 2009 22:41:34 -0500 X-Sasl-enc: 2ufNjOYHajEUb8f3gya3TFkEuWGlLns+GTLmSWl13p+B 1231731693 Received: from hagrid.ewd.goldmark.org (n114.ewd.goldmark.org [72.64.118.114]) by mail.messagingengine.com (Postfix) with ESMTPSA id 8ECB520FCC; Sun, 11 Jan 2009 22:41:33 -0500 (EST) Message-Id: <7813F00E-0F26-4127-B85F-444EA6B8B5A6@goldmark.org> From: Jeffrey Goldberg To: Dan Nelson In-Reply-To: <20090112030717.GA57874@dan.emsphone.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Sun, 11 Jan 2009 21:41:31 -0600 References: <7740275E-77AA-45C1-B95E-C1F62D2AAB29@goldmark.org> <20090112030717.GA57874@dan.emsphone.com> X-Mailer: Apple Mail (2.930.3) Cc: "mail.list freebsd-questions" Subject: Re: bash versus sh test builtin X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2009 03:41:35 -0000 On Jan 11, 2009, at 9:07 PM, Dan Nelson wrote: > UID=$(id -u) > if [ $UID -ne 0 ] ; then > echo not root > fi > > UID is not a variable set by /bin/sh, which is why the test fails. Ah. Thank you. I was, as you see, barking up the wrong tree. Thank you for setting me strait on this. Cheers, -j