How can I extract some pattern contained in PDF file to text file using shell?

closed as unclear what you're asking by jasonwryan, Michael Homer, polym, bsd, Braiam Aug 31 '14 at 13:04

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What do you mean by 'pattern'? You need to explain your requirements in more detail. – garethTheRed Aug 31 '14 at 7:29

PDF is a formatted data and you couldn't access its content in shell but if you install poppler-utils ,then you could convert it to text and search for your pattern with grep

pdftotext my.pdf - | grep 'your_pattern' > example.txt

so you have your pattern in example.txt file .

Not the answer you're looking for? Browse other questions tagged or ask your own question.