Skip to content

Instantly share code, notes, and snippets.

@aaronlerch
Created April 5, 2013 18:12
Show Gist options
  • Save aaronlerch/5321393 to your computer and use it in GitHub Desktop.
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.
fs() {
if [ "$#" -lt 1 ]
then
echo "A search string is required"
return
fi
find . -iname "${2:-*.cs}" | xargs grep "$1" -s
}
@aaronlerch
Copy link
Author

Ignore this gist. Instead, do brew install the_silver_searcher.
https://github.com/ggreer/the_silver_searcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment