Update: Now located at https://github.com/anoved/Finder-Scripts/tree/master/Select%20Grep
This script for the Finder is derived directly from the venerable lselect. Rather than select files whose names match a certain pattern, Select Grep selects files whose contents match a certain pattern.
Subdirectories are not searched and the pattern is not case sensitive. Extended regular expressions are supported. Compatibility with binary files has not been tested. The specific options given to
-liE. The script is easily edited to use different option combinations; please share any improvements.
Put the script in
~/Library/Scripts/Applications/Finder and run it to select files in the frontmost Finder window that contain the search pattern.