Skip to content

Instantly share code, notes, and snippets.

@tbensonwest
Forked from Rafe/gist:2389552
Created March 11, 2020 16:50
Show Gist options
  • Save tbensonwest/29de213a5e8433f81944b4f6cb237157 to your computer and use it in GitHub Desktop.
Save tbensonwest/29de213a5e8433f81944b4f6cb237157 to your computer and use it in GitHub Desktop.
Grep cheatsheet
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