The [grep](http://en.wikipedia.org/wiki/Grep) utility searches a pattern (regular expression) in a text file. There are many options to control how matches are performed and how to display matches.  

The name `grep` comes from the `ed` (a Unix line editor) command `g/re/p` which means “**g**lobally search for a **r**egular **e**xpression and **p**rint all lines containing it”.

### External references

* [grep specification (Single UNIX v3)](http://pubs.opengroup.org/onlinepubs/009695399/utilities/grep.html)
* [GNU grep manual](http://www.gnu.org/software/grep/manual/grep.html)

### Tutorials

* [grep tutorial](http://www.panix.com/~elflord/unix/grep.html)
* [regular-expression.info](http://www.regular-expressions.info/)


### Further reading

* http://unix.stackexchange.com/questions/366/convince-grep-to-output-all-lines-not-just-those-with-matches
* http://unix.stackexchange.com/questions/6979/grep-count-total-number-of-occurrences
* http://unix.stackexchange.com/questions/11067/is-there-a-way-to-modify-a-file-in-place
* http://unix.stackexchange.com/questions/3514/how-to-grep-standard-error-stream-stderr
* http://unix.stackexchange.com/questions/11305/grep-show-all-the-file-up-to-the-match
* http://unix.stackexchange.com/questions/3229/grep-and-tail-f