Skip to content

Instantly share code, notes, and snippets.

@Pro
Created April 22, 2014 12:43
Show Gist options
  • Save Pro/11177605 to your computer and use it in GitHub Desktop.
Save Pro/11177605 to your computer and use it in GitHub Desktop.
fif command (find in files)
#!/bin/bash
show_usage() {
echo -e "Usage: $0 SEARCH_STRING"
echo ""
}
if [ $# -lt 1 ]
then
show_usage
exit 1
fi
grep --color=always --exclude-dir='.svn' -rnwi '.' -e "$1" 2>/dev/null
#find . -not -ipath '.*svn*' | xargs grep "$1" 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment