-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Kevin Downey wrote:
> On 1/3/07, Jerry McAllister <[EMAIL PROTECTED]> wrote:
>> 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 fo
Robert Huff wrote:
> This is probably staring me in the face:
>
> if [ ! -d "foo"]
Missing space ^ here.
ie:
if [ ! -d "foo" ]
then
mkdir foo
fi
or perhaps more succinctly:
[ -d "foo" ] || mkdir "foo"
or best of all, maybe just:
mkdir -p "foo"
On 1/3/07, Jerry McAllister <[EMAIL PROTECTED]> wrote:
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
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 thin
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
On 1/3/07, Bill Moran <[EMAIL PROTECTED]> wrote:
In response to Robert Huff <[EMAIL PROTECTED]>:
>
> 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" ]
On Jan 3, 2007, at 3:07 PM, Robert Huff wrote:
if [ ! -d "foo"]
then mkdir foo
fi
You want a space before the "]" and a semicolon after it.
--
-Chuck
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/fr
In response to Robert Huff <[EMAIL PROTECTED]>:
>
> 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 director