OT: stupid sh scripting question
Dan Nelson
dnelson at allantgroup.com
Wed Jan 3 13:12:18 PST 2007
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 at allantgroup.com
More information about the freebsd-questions
mailing list