Skip to content

Instantly share code, notes, and snippets.

@nicdoye
Created October 11, 2016 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicdoye/62a2000972ee347123f079b70e994bc2 to your computer and use it in GitHub Desktop.
Save nicdoye/62a2000972ee347123f079b70e994bc2 to your computer and use it in GitHub Desktop.
Find a string in any file (note may include binaries) in the current folder, but exclude anything under a .git folder
function lgrep {
local str=$1
find . -type f -not -path '*/.git/*' -exec grep -l ${str} {} \;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment