On Thursday 08 December 2005 15:15, Matthew Hannigan wrote: > On Thu, Dec 08, 2005 at 12:46:16PM +1100, James Gray wrote: > > Hi All, > > > > I've been fiddling with a script and can't quite get it to work. The > > problem is premature wild-card expansion. > > > > FILES="*.upd dat*.zip *.tar sdat*.exe" > > [ ... ] > > for PATTERN in $FILES > > Quotes around $FILES (i.e. "$FILES") should work, > but you said you tried that?
Yeh, then find gets passed something that results in: find . -name "*.upd dat*.zip *.tar sdat*.exe".... which doesn't have the desired result. John solved it for me by preventing bash from expanding filename globbing by invoking the shell with "-f". Simple and it works :) Thanks for the suggestion tho! Cheers, James -- He's the kind of guy, that, well, if you were ever in a jam he'd be there... with two slices of bread and some chunky peanut butter. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html