Created
May 17, 2013 14:44
-
-
Save oxUnd/5599503 to your computer and use it in GitHub Desktop.
search everything..
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
#!/usr/bin/env sh | |
usage () { | |
echo 'g <filename pattern> <search keyword>' | |
exit 1 | |
} | |
if [ $# != 2 ]; then | |
usage | |
fi | |
pattern=$1 | |
keyword=$2 | |
search_folder=`pwd` | |
find "$search_folder" -name "$pattern" | xargs grep --color -n -E "$keyword" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment