On Thursday 06 September 2001 16:52, Chmouel Boudjnah wrote:
> "Jason Dyer" <[EMAIL PROTECTED]> writes:
> > > CLASSPATH="`mkpath /usr/java/lib/*.jar`:$CLASSPATH"
> >
> > No, adding quotes does not help.
>
> and :
>
> local FOO
> FOO="$(mkpath /usr/java/lib/*.jar)"
> CLASSPATH="$FOO:$CLASSPATH"
>
> works ?
No, it complains repeatedly that local can only be used in a function.
Here's another variant I tried:
echo before FOO >> foo.log
FOO="$(/usr/bin/mkpath ~/java/lib/*.jar)"
echo after FOO >> foo.log
CLASSPATH=$FOO:$CLASSPATH
The results in foo.log were:
before FOO
before FOO
before FOO
... 340 more lines of before FOO
after FOO
after FOO
after FOO
... 340 more lines of after FOO
If that doesn't indicate recursion that's happening during the $()
evaluation, I don't know what does.
-Jason