Select Grep

Update: Now located at https://github.com/anoved/Finder-Scripts/tree/master/Select%20Grep


Select Grep dialog screenshot

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.

Download Select Grep 1.0 6K

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 grep are -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.

Posted on Saturday, December 8th, 2007. Tags: , , .