Created
April 15, 2012 02:40
-
-
Save Rafe/2389552 to your computer and use it in GitHub Desktop.
Grep cheatsheet
This file contains hidden or 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 [PATTERN] [FILE] | |
grep apple fruitlist.txt | |
grep apple *.txt | |
grep ^app fruitlist.txt | |
"-x :: exact line | |
grep -x apple fruitlist.txt | |
"-v :: without | |
"-n :: line num | |
"pipeline : for line without username and password:: | |
grep -v username list.txt | grep -v password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment