Le lundi 15 octobre 2007 à 23:43 +0100, Steve Long a écrit : > Roy Marples wrote: > The unintended globbing is indeed unsafe, in the general case. I'd do this: > > find "$D" -type f -name '*'"$v"'.*pm' -exec rm {} + > > The shell will still treat that all as one argument (this method is > typically used to insert variables into awk commands, or sed ones which > use ".) The + will make the command execution more efficient for commands > that take multiple filenames. The one caveat with + is that the {} must > appear at the end of the command.[3] I haven't reread the fine mans for a while but iirc, + could lead you to hit the argument buffer limit of your shell. xargs has --max-args to get around that and is also way faster than any -exec variant (at least that's what the bench I did on a PIV2.6Ghz showed me about 4 months ago) -- Gilles Dartiguelongue Gentoo