16 Oct 2020
#!/bin/bash
find . -type f -name "*.od*" | while read i ; do
[ "$1" ] || { echo "You forgot search string!" ; exit 1 ; }
unzip -ca "$i" 2>/dev/null | grep -iq "$*"
if [ $? -eq 0 ] ; then
echo "string found in $i" | nl
fi
done
https://askubuntu.com/questions/938834/grep-for-text-in-odt-or-doc-file…
para documentos doc:
find -name '*.doc' | while read -r file; do
catdoc "$file" | grep -H --label="$file" "specificword"
done
https://superuser.com/a/330244
para docx ver https://www.lingolingo.pt/content/conversao-em-lote-de-ficheiros-doc-e-…