Created
April 5, 2013 18:12
-
-
Save aaronlerch/5321393 to your computer and use it in GitHub Desktop.
find-string (fs) for bash
In powershell I had "fs" wrap a simple find-string helper. Been missing it in bash, but it was easy enough to create.
This file contains hidden or 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
fs() { | |
if [ "$#" -lt 1 ] | |
then | |
echo "A search string is required" | |
return | |
fi | |
find . -iname "${2:-*.cs}" | xargs grep "$1" -s | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ignore this gist. Instead, do
brew install the_silver_searcher
.https://github.com/ggreer/the_silver_searcher