Created
October 11, 2016 14:47
-
-
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
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
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