I need help to solve a situation. It's seems rather simple, but it's not I guess.
#!/bin/bash pdfgrep -Hn $1 *.pdf exit 0
If I run this code in any directory containing ocr'd PDF-files it will spit out "matching file+page number in that file+matching line for the pattern $1".
Now to the problem. Say I want to do the same thing with 2 patterns "$1" and "$2". It will not be as easy as
pdfgrep -Hn $1 | pdfgrep -Hn $2 *.pdf
How could this be done, so that the result will be "matching file+page number in that file containing both patterns $1 and $2"?
Any help appreciated:-)