On Fri, 23 Jan 2004, Guy Van Sanden wrote:
Is it possible to search through openoffice documents in a given directory (or subdirectories) for a text string? And if so, how can it be done?
The OpenOffice file format is zipped xml. So you should just be able to use zgrep, although it will miss any phrases that have extra formatting in them, such as a phrase in which part of it is underlined. Also, I'm not sure how that will handle newlines.
Since all the text is in one xml formated line, grep will print complete text (if matches). Some workaround is needed before grep ...
these steps are needed:
1. unzip "content.xml" from OOo document 2. convert it to text format 3. grep
try this (not tested)
unzip -p your-OOo-document content.xml \ | sed "s/<[^<>]*>/\n/g" \ | grep string
noro
-- [EMAIL PROTECTED] mailing list
