Grep for word documents
Hi
I have 10 (.doc) files and out of that 7 files has got a specific word I am looking for. But when I run the grep command it only outputs 5 files and not all the 7 files. e.g. grep -i -w -f 'smith' Please can somebody explain why it does not work on all word documents. Many thanks |
I'm surprised it worked on any. You're looking for an ASCII string in UTF-16 data.
|
i wonder what the "-f" switch is doing there.
Quote:
word documents contain the written text in plain text, more or less, afaik, but the "-w" option might block some results, e.g. if the word is followed immediately by some weird character, without a space in between. |
http://www.irongeek.com/i.php?page=b...k-3-man/catdoc
Use catdoc to 'cat' the Word file and 'grep' through the resulting output. |
All times are GMT -5. The time now is 05:25 PM. |