I was using a script I got from someone on AskUbuntu to search for text in some files when I came across what appears to me to be a strange phenomenon. The script uses this line to search for a string in an ODT:
unzip -ca "test.odt" 2>/dev/null | grep -i "Task 2.11"
If I open the ODT with Writer I see exactly those words “Task 2.11”. But grep doesn’t find it. I copied and pasted just that phrase into a test file to isolate it and I noticed that while grep still doesn’t find the original instance of the phrase, if I typed on the next line “Task 2.11” and ran the command above it finds it just fine:
grep: (standard input): binary file matches
It is only that precise instance of the phrase it doesn’t find. I saved the file as an html using Writer and I noticed another strange thing. The T in the first instance of “Task 2.11” appears separate from the rest of the phrase. Why would this be?
Thanks in advance.
test.odt (8.8 KB)