Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2007 16:18:52 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        questions@freebsd.org
Subject:   Re: OT: stupid sh scripting question
Message-ID:  <20070103211852.GB60153@gizmo.acns.msu.edu>
In-Reply-To: <17820.3343.799303.349686@jerusalem.litteratus.org>
References:  <17820.3343.799303.349686@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070103211852.GB60153>