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
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 directory $linkdir does not
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
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 ]; then
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
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
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 but ';'
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
Cheers,
-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 foo
fi
gives