Last active
September 1, 2015 18:38
-
-
Save cblgh/d05481703c2050215635 to your computer and use it in GitHub Desktop.
a grep alias to easily find stuff in folders
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
# part of my .zshrc | |
# looks for the pattern $2 in the folder $1 and its subfolders | |
# folder pattern | |
# usage: grepfind ~/.irclogs potato | |
# | |
# use quotes when searching for sentence fragments: | |
# grepfind ~/.irclogs "potato cannon" | |
function goGrepGO() { | |
grep -rnw "$1" -e "$2" | |
} | |
alias grepfind=goGrepGO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment