Bob Cox schrieb: > On Mon, Mar 16, 2009 at 15:29:50 +0100, Sjoerd Hardeman > (sjo...@lorentz.leidenuniv.nl) wrote: > >> Sjoerd Hardeman wrote: >>> What about >>> find . -name *.odt -exec unzip -c {} content.xml | grep "what you want >>> to find"\; -print >> This one is not working, use >> find . -name *.odt -exec sh -c 'unzip -c {} content.xml | grep "what >> you want to find"' \; -print > > Ingenious - but I think the *.odt needs to be within quotation marks for > this to work, (i.e. '*.odt'). >
{} should also be quoted, in case that there are file names with spaces or other special characters. And grep (or sh) output should be redirected to dev/null: find . -name *.odt -exec sh -c 'unzip -c "{}" content.xml | grep "what you want to find" > /dev/null' \; -print -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org