recursive grep and openoffice

2009-03-18 Thread John O Laoi
Thanks for all of your replies. I didn't know that tools such as tracker would search with openoffice document. With respect to the command line, I have fixed on find . -name *.odt -exec sh -c 'unzip -c {} content.xml | grep string-being sought /dev/null' \; -print but it returns

Re: recursive grep and openoffice

2009-03-18 Thread Rainer Kluge
John O Laoi schrieb: find . -name *.odt -exec sh -c 'unzip -c {} content.xml | grep string-being sought /dev/null' \; -print For me it works . Maybe you should quote *.odt: '*.odt'. And try just find . -name *.odt to see if the odt files are found. Rainer -- To UNSUBSCRIBE, email

Re: recursive grep and openoffice

2009-03-18 Thread Boyd Stephen Smith Jr.
In 1f1816a90903180556k56e3e592qa14c55d1c3193...@mail.gmail.com, John O Laoi wrote: Thanks for all of your replies. I didn't know that tools such as tracker would search with openoffice document. With respect to the command line, I have fixed on find . -name *.odt -exec sh -c 'unzip -c {}

Re: recursive grep and openoffice

2009-03-18 Thread Ken Irving
On Wed, Mar 18, 2009 at 11:19:20AM -0500, Boyd Stephen Smith Jr. wrote: In 1f1816a90903180556k56e3e592qa14c55d1c3193...@mail.gmail.com, John O Laoi wrote: With respect to the command line, I have fixed on find . -name *.odt -exec sh -c 'unzip -c {} content.xml | grep string-being sought

Re: recursive grep and openoffice

2009-03-18 Thread Boyd Stephen Smith Jr.
In 20090318164208.ga14...@localhost, Ken Irving wrote: On Wed, Mar 18, 2009 at 11:19:20AM -0500, Boyd Stephen Smith Jr. wrote: I think I'd rewrite it as: find . \ -name '*.odt' \ -exec sh -c 'unzip -c $1 content.xml | grep -q regex' \{} \; \ -print I'm not sure what the rules are for find

Re: recursive grep and openoffice

2009-03-18 Thread Ken Irving
On Wed, Mar 18, 2009 at 01:45:42PM -0500, Boyd Stephen Smith Jr. wrote: In 20090318164208.ga14...@localhost, Ken Irving wrote: On Wed, Mar 18, 2009 at 11:19:20AM -0500, Boyd Stephen Smith Jr. wrote: I think I'd rewrite it as: find . \ -name '*.odt' \ -exec sh -c 'unzip -c $1 content.xml

recursive grep and openoffice

2009-03-16 Thread John O Laoi
Hello, I sometimes need to find a file, and I only know of some text contained therein. So I launch a search as follows: $ grep -r text i am looking for /home/john OR $ find /home/john -type f -exec grep -i * **text i am looking for * '{}' \; -print where /home/john is my home

Re: recursive grep and openoffice

2009-03-16 Thread Sjoerd Hardeman
John O Laoi wrote: Hello, I sometimes need to find a file, and I only know of some text contained therein. |The problem is that this does not search within .odt openoffice files.| |It will located any .doc files that contain the string, but not openoffice files.| You mean MS-word? How

Re: recursive grep and openoffice

2009-03-16 Thread Sjoerd Hardeman
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 instead. Sjoerd -- () ascii ribbon

Re: recursive grep and openoffice

2009-03-16 Thread Bob Cox
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

Re: recursive grep and openoffice

2009-03-16 Thread Rainer Kluge
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

Re: recursive grep and openoffice

2009-03-16 Thread H.S.
Sjoerd Hardeman 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 instead. Sjoerd