Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2007 14:41:57 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        questions@freebsd.org
Subject:   Re: OT: stupid sh scripting question
Message-ID:  <20070103204157.GI46561@dan.emsphone.com>
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
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



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