Skip to content

Instantly share code, notes, and snippets.

@cblgh
Last active September 1, 2015 18:38
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 cblgh/d05481703c2050215635 to your computer and use it in GitHub Desktop.
Save cblgh/d05481703c2050215635 to your computer and use it in GitHub Desktop.
a grep alias to easily find stuff in folders
# 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