From owner-freebsd-questions@FreeBSD.ORG Wed Jan 3 21:12:18 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23F5B16A403 for ; Wed, 3 Jan 2007 21:12:18 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id C703513C459 for ; Wed, 3 Jan 2007 21:12:13 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id l03KfvPF002933; Wed, 3 Jan 2007 14:41:57 -0600 (CST) (envelope-from dan) Date: Wed, 3 Jan 2007 14:41:57 -0600 From: Dan Nelson To: Robert Huff Message-ID: <20070103204157.GI46561@dan.emsphone.com> References: <17820.3343.799303.349686@jerusalem.litteratus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17820.3343.799303.349686@jerusalem.litteratus.org> X-OS: FreeBSD 6.2-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) Cc: questions@freebsd.org Subject: Re: OT: stupid sh scripting question 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: Wed, 03 Jan 2007 21:12:18 -0000 In the last episode (Jan 03), Robert Huff said: > > This is probably staring me in the face: > > if [ ! -d "foo"] > then mkdir foo > fi > > gives me: > > [: missing ] > > Looking at rc.subr I see: > > if [ ! -d "$linkdir" ]; then > warn "$_me: the directory $linkdir does not exist." > return 1 > fi You need a space between "foo" and ] . -- Dan Nelson dnelson@allantgroup.com