From owner-freebsd-questions@FreeBSD.ORG Wed Jan 3 21:23:09 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 9FC7E16A412 for ; Wed, 3 Jan 2007 21:23:09 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 71F0413C45B for ; Wed, 3 Jan 2007 21:23:09 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id l03LIr7Q060283; Wed, 3 Jan 2007 16:18:53 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id l03LIrX1060282; Wed, 3 Jan 2007 16:18:53 -0500 (EST) (envelope-from jerrymc) Date: Wed, 3 Jan 2007 16:18:52 -0500 From: Jerry McAllister To: Robert Huff Message-ID: <20070103211852.GB60153@gizmo.acns.msu.edu> 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> User-Agent: Mutt/1.4.2.2i 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:23:09 -0000 On Wed, Jan 03, 2007 at 03:07:43PM -0500, Robert Huff wrote: > > This is probably staring me in the face: > > if [ ! -d "foo"] > then mkdir foo > fi > > gives me: > > [: missing ] It is probably not telling you ':' missing but ';' missing. It goes after the ']', plus I think the space before ']' is required. ////jerry > > Looking at rc.subr I see: > > if [ ! -d "$linkdir" ]; then > warn "$_me: the directory $linkdir does not exist." > return 1 > fi > > > Robert Huff > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"