Somebody gave me a script. I find it very useful for finding a word or phrase within my odt documents. I hope this helps.

Ubuntu 14.04

Don Pobanz

don@PC-002:~/Documents/Sermons$ cat search_odt_files
#!/bin/bash
# run this script by typing the following
# sh search_odt_files "this string"
if [ $# -ne 1 ]; then
    echo "Usage: searchodt searchterm"
    exit 1
fi
# added */ in front of *.odt to search subdirectories of a directory
for file in $(ls */*.odt); do
    unzip -ca "$file" content.xml | grep -ql "$1"
    if [ $? -eq 0 ]; then
        echo "$file"
    fi
done
don@PC-002:~/Documents/Sermons$




On 08/24/2014 08:25 AM, Tom Davies wrote:
Hi :)
Which platform?

If you are on Gnu&Linux then some sort of grep command on the command line
might be an optimally efficient route.

I am assuming your searching the contents rather than just searching for a
file-name as a file-name search would be fairly trivial in any OS wouldn't
it?
Regards from
Tom :)





On 24 August 2014 12:30, Maurice <[email protected]> wrote:

Given a list of documents, is there a convenient way of doing a Find on
the whole set of documents in the list?

--
/\/\aurice
         (Retired in Surrey, UK)     Registered Linux User #487649
         Linux 64-bit Mageia-4:   Pan 0.139   LibreOffice 4.1.5.3
           KDE 4.11.4  Virtualbox 4.3.10   Firefox 24.5   KMail 4.11.4


--
To unsubscribe e-mail to: [email protected]
Problems?
http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted



--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to