grep is a command-line tool for searching text patterns in files

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

history | excerpt history