Bash Script | Find/grep keyword from docs(MS document file) | without any additional installation | linux

A task where we can pull the data from the doc file which match the string from file and get the count of it .

In below screenshot, contain the string/keyword that we need to search/grep from doc file.

grep the matching string from doc file

command:

 while read -r line; do  ; unzip -p 12_karela_jamun_juice_for_Seniors.docx | grep '<w:t' | sed 's/<[^<]*>//g'  | grep -io $line  | wc -l | xargs echo $line: ; done < searchfile.txt
grep the file string/keyword that match in doc file