Skip to content

Instantly share code, notes, and snippets.

@davesque
Created February 12, 2013 17:08
Show Gist options
  • Save davesque/4771396 to your computer and use it in GitHub Desktop.
Save davesque/4771396 to your computer and use it in GitHub Desktop.
Grep wrapper
local base_cmd="grep --exclude-dir=CACHE --exclude-dir=ckeditor --binary-files=without-match --colour -Enr"
if [[ $# -eq 1 ]]; then
eval "$base_cmd $1 *"
elif [[ $# -gt 1 ]]; then
eval "$base_cmd $@"
else
echo "usage: se SEARCH_STRING [FILE_PATTERN]"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment