For questions pertaining to grep, a command-line tool for searching text patterns in files. Use this tag for questions about grep itself or questions about issues arising from using the grep command-line tool.

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


Further reading