The 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 “globally search for a regular expression and print all lines containing it”.
External references
- grep specification (Single UNIX v3)grep specification (The Open Group Base Specifications Issue 7, 2018 edition)
- GNU grep manual