Skip to content

Instantly share code, notes, and snippets.

@aaronlerch
Created April 5, 2013 18:12
Show Gist options
  • Select an option

  • Save aaronlerch/5321393 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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