I've searched online and I cannot find the answer I need..I need to search recursively in Linux environment through multiple directories for a file named "monthly_spd.pdf" for a key word phrase such as "MOS-corrected" and then print that row where "MOS-corrected" is found and also print the path/filename.
I've tried this below and I can print or display the file/path name but I have not figured out how to print the row where the key word phrase ("MOS-corrected") is found in each file. Thank you.
find . -name 'monthly_spd.pdf' -exec echo {} \: -exec pdftotext {} - \; | grep "MOS-corrected, r\|pdf"