2
0
I use pdfgrep
in Fedora 25 and I need to locate pdf files containing "just" two strings: I tried like this but I think it is wrong:
pdfgrep -HiRn 'string 1|string 2' .
How should this command be corrected?
2
0
I use pdfgrep
in Fedora 25 and I need to locate pdf files containing "just" two strings: I tried like this but I think it is wrong:
pdfgrep -HiRn 'string 1|string 2' .
How should this command be corrected?
0
Your command looks good. The problem is likely to be the pipe symbol |
. Standard grep
doesn't handle that without escaping it. Since the man
page for pdfgrep
says "pdfgrep works much like grep," it may suffer the same syntax limits.
To make it work you will need to escape the |
like this \|
.
pdfgrep -HiRn 'string 1\|string 2' .