OT: stupid sh scripting question

Bill Moran wmoran at collaborativefusion.com
Wed Jan 3 12:26:34 PST 2007


In response to Robert Huff <roberthuff at rcn.com>:

> 
> 	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

The ; after the ] ?

-- 
Bill Moran
Collaborative Fusion Inc.


More information about the freebsd-questions mailing list