Grep on catdoc
Hi
I am new to using linux. I am trying to use catdoc grep for a list of phrases on word documents. The syntax below gives me the matches found in the document but not the file name. Please can anybody help me with the syntax that will show the file name and the matches found. find . -iname "*.doc" -print0 | while read -d $'\0' file; do catdoc "$file" | grep -i -w -f ~tmp/test.txt; done Many thanks |
This adds a "&& echo ::: $file" to the command:
Code:
find . -iname "*.doc" -print0 | while read -d $'\0' file; do catdoc "$file" | grep -i -w -f ~tmp/test.txt && echo ::: $file; done |
Thank you very much for the quick reply. This works fine.
|
All times are GMT -5. The time now is 03:49 PM. |