Created
January 19, 2012 16:51
-
-
Save thanosp/1641130 to your computer and use it in GitHub Desktop.
WTF (Where the fuck)
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
#Where the fuck? | |
wtf() | |
{ | |
if [ -z "$1" ]; then | |
echo -e 'Usage: wtf [regex] ([path])' | |
else | |
if [ -z "$2" ]; then | |
baseDir="." | |
else | |
baseDir="$2" | |
fi | |
grep -HiIRn --exclude-dir=\.svn "$1" "$baseDir" 2>/dev/null | grep -v "library/Zend" | more | |
fi; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment