Mark C. Allman wrote:
> On Tue, 2007-10-30 at 13:32 -0700, [EMAIL PROTECTED] wrote:
>>> Try
>>>
>>> OLD_IFS=$IFS
>>> IFS="
>>> "
>>> find ${FOP}/lib -name -name '*.jar'|while read jarfile
>>> do
>>>       if [ -z "$LOCALCLASSPATH" ] ; then
>>>         LOCALCLASSPATH="$jarfile"
>>>       else
>>>         LOCALCLASSPATH="$jarfile"${pathSepChar}$LOCALCLASSPATH
>>>       fi
>>> done
>>> IFS=$OLD_IFS
>>>
>> find "${FOP}/lib" -name '*.jar'|while read jarfile
>> do
>>       if [ -z "$LOCALCLASSPATH" ] ; then
>>         LOCALCLASSPATH=$jarfile
>>       else
>>         LOCALCLASSPATH=$jarfile${pathSepChar}$LOCALCLASSPATH
>>       fi
>> done
>>
>> would be almost perfect, and avoid the need for the change of IFS,
>> except that
>> the call to find places the whole while loop in a subshell, and
>> updates of
>> LOCALCLASSPATH are lost when it returns. 
> 
> Change to:
> 
>         for jarfile in `find "${FOP}/lib" -name '*.jar'`; do
>               if [ -z "$LOCALCLASSPATH" ] ; then
>                 LOCALCLASSPATH=$jarfile
>               else
>                LOCALCLASSPATH=$jarfile${pathSepChar}$LOCALCLASSPATH
>               fi
>         done
> 
> -- Mark C, Allman, PMP
> -- Allman Professional Consulting, Inc.
> -- www.allmanpc.com, 617-947-4263
> 
> BusinessMsg -- the secure, managed, J2EE/AJAX Enterprise IM/IC solution

I think this brings back the original problem.

Peter

Reply via email to