Skip to content

Instantly share code, notes, and snippets.

@gongbaochicken
Last active January 19, 2017 23:06
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 gongbaochicken/5026a9b67f5f108fec80a2b8858391a2 to your computer and use it in GitHub Desktop.
Save gongbaochicken/5026a9b67f5f108fec80a2b8858391a2 to your computer and use it in GitHub Desktop.
grep commands
#I use grep almost every day. Such a powerful tool should be used in a very skillfull way.
#I want to open this gist for notetaking when I meet new commands.
#search in a folder in recursive way
grep -r "task" ../src
#ignore the case
grep -r -i "TaSk" ../src
#search for a whole word
grep -w 'hello' *
#work with regular expression
grep -r "@param .* - " ./
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment