Created
January 7, 2014 17:49
-
-
Save mminer/8303398 to your computer and use it in GitHub Desktop.
Performs a recursive grep search, looking only at Python files. The first argument is the search string, the second on is the directory to search through. Handy when aliased to a command like "searchpy".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
grep -r --include='*.py' "$1" ${2:-.} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This could be trivially modified to search any given file type, I just happen to do a lot of searching through Python files.