Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

Tuesday, April 26, 2011

How to grep in unix

The "grep" command allows you to find text within a file

grep -r -i main-content ../../

grep [options] [search query / pattern] [where]

Some options
-r / recursive: read all files under each directory, recursively
-i / ignore case: upper - lower case friendly