Simple Search for String
I'm sure this is obvious for any Unix guru, but I constantly find myself looking this command up when I need it, so I'm writing it here.
To see every place where a certain string (say, a variable name, function call, etc) appears in your codebase, navigate to the root of your project and run:
grep -r --color "<search_term>" .
Don't forget the dot on the end. I like the color flag cause.. why not.
Written by Hartley Brody
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Grep
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#