OK, I'm going to do this without looking. It will be something like pdftotext foo | grep whatever, right?
Let's watch and see....
Well, close enough. Note that that was not being done on a Debian system. For Debian (like Ubuntu) you would use apt to install the tools.
apt-get install poppler-utils

Looking for stuff about birds?
Learn more about Charles Darwin and his work.
Lean more about lions

Comments
Or xpdf-utils, Poppler being a fork of Xpdf.
Posted by: Barry | June 14, 2009 7:47 PM
Wouldn't it just be easier to open the pdf and search for the phrase? Then you'd know the context as well as the location of the string. I'm sympathetic to the wonders of the command line, but this looks like a fair amount of work.
Posted by: richard | June 14, 2009 9:13 PM
richard, suppose you are searching through 1000 pdf's of articles you snagged over the last few years? This can be a batch operation over many files this way.
Posted by: Markk | June 14, 2009 10:46 PM
Oh, gosh, you linux-people are a never ending source of mirth :-)
Posted by: Michael Spencer | June 15, 2009 7:03 AM
With some not-so-recent versions of Adobe Acrobat you can search multiple PDF files at once. It may be (I don't know) resonably slower, however.
With some tweaks and experimentations this could be very interesting, I think. Coupling it with "less" (simply "| less" at the end of the line will do it, albeit I think it's better with grep --color=always, so the term will be highlighted) and things like that.
Posted by: Buckaroo Banzai | November 26, 2009 11:14 AM
Or you could navigate to the folder in the Finder, type the string you want in the search field and click the name of the folder to restrict the search and click 'contents' (default) to search within the files rather than the file names.
Posted by: Ben Zvan | November 26, 2009 11:30 AM
I don't think Windows search, Finder, or Adobe's search can tell me all the instances of "quadratic" or "quadratics" that occurs without "relation", "function" or "equation" following it.
Long live grep!
Posted by: Rachelle | October 14, 2010 9:47 AM