Last active
November 21, 2017 18:48
-
-
Save marcusshepp/7f2d13d0d727c6be5612d07b655187cf to your computer and use it in GitHub Desktop.
grep
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
grep "4294" -B 3 -A 3 | |
grep -r "foo" . | |
# -H causes the filename to be printed (implied when multiple files are searched) | |
# -r does a recursive search | |
# -n causes the line number to be printed | |
# -I ignore binary files (complement: -a treat all files as text) | |
# -F treat search term as a literal, not a regular expression | |
# -i do a case-insensitive search | |
# --color colors the seached string | |
# --include \*.js to limit search to a specific file extention | |
grep -HrnIFi --exclude-dir=.git "foo" app/ | |
grep --color -rIF --include \*.js dbPromotion app/scripts/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment