Created
September 24, 2014 14:25
-
-
Save k-stailey/b9294351be436958cfa4 to your computer and use it in GitHub Desktop.
Lost some stupid info because it's in a LibreOffice file? Line up the suspects fast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ $# -ne 1 ]; then | |
echo "Usage: `basename $0` searchterm (regex)" | |
exit 1 | |
fi | |
(locate .odt | grep odt$ ; locate .ods | grep ods$) | | |
while read file | |
do | |
unzip -ca "$file" content.xml | grep -il "$1" > /dev/null | |
if [ $? -eq 0 ]; then | |
echo "$file" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment