On Wed, 2007-10-31 at 15:05 +1000, Peter B. West wrote: > 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
We've fixed this before (more than once, I think), so I'll dig up what we did and re-post it. I thought this was a new problem. We used something in Cygwin to fix up path strings. You'd use it in the loop to fix each path for prepending. I didn't have time last night to find it (worked on a business plan). -- Mark C, Allman, PMP -- Allman Professional Consulting, Inc. -- www.allmanpc.com, 617-947-4263 BusinessMsg -- the secure, managed, J2EE/AJAX Enterprise IM/IC solution