Skip to content

Instantly share code, notes, and snippets.

@dsimard
Created September 22, 2011 14:30
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 dsimard/1234911 to your computer and use it in GitHub Desktop.
Save dsimard/1234911 to your computer and use it in GitHub Desktop.
Find in all files
# Clone this gist
git clone git://gist.github.com/1234911.git ~/your/path/to/faf
# Change rights
chmod 755 ~/your/path/to/faf/fah.sh
# Add this line to your ~\.bashrc
alias faf='~/your/path/to/faf.sh'
# Close your terminal and open a new one
#!/bin/bash
if [ $# -eq 0 ]; then
echo "You must include a regex to search. faf something"
exit 1;
fi
grep -r -n -i $1 --exclude=*.log $PWD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment