Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automator or other script experts?
#11
You may want to try this modification. I think I left out an-a option for binary files. While the text in your output PDF may appear readable in its composite form, the "text" within it may not be so clean. I just tried this on a sample PDF with one visible instance of the searchTerm, but there are actually 20 or so in the file's data contents. Best of luck to you.

set searchTerm to (display dialog 
Input the search string:
default answer
suspect
)'s text returned
(do shell script
fgrep -iraA1
& searchTerm's quoted form & space & (choose folder with prompt
Locate the folder containing the files to be searched.
)'s POSIX path's quoted form)
Reply


Messages In This Thread
Automator or other script experts? - by deckeda - 01-17-2020, 08:33 PM
Re: Automator or other script experts? - by Marc Anthony - 01-18-2020, 10:36 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)