LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grep on .odt files (https://www.linuxquestions.org/questions/linux-newbie-8/grep-on-odt-files-4175511386/)

ns1971 07-17-2014 08:42 AM

Grep on .odt files
 
Hi

How to do grep on .odt files?

Many thanks

rtmistler 07-17-2014 12:06 PM

My read is that you cannot do this. Try viewing an ODT file for starters and you'll see that they are encoded in a non-ASCII visible manner; therefore you cannot run simple grep to accomplish what you're looking for.

I took a quick look at LibreOffice Writer and while one can search, and search well "within" an open document, you cannot do that over multiple documents or have the concept of a Project containing multiple documents where you could search through the scope of all project files. There are macro capabilities for LibreOffice Writer, I don't know if they'd allow you to process multiple documents though.

cepheus11 07-17-2014 12:44 PM

ODT files are ZIP files containing a structure of files and directories. You can unzip them. The text is in xml format in content.xml.


All times are GMT -5. The time now is 05:55 PM.