grep is a command-line utility for searching plain-text data sets for lines matching a regular expression. It is one of the most fundamental and widely used tools in Unix and Linux systems, available on virtually every POSIX system.
Key Features
Regular Expression Search — Basic, extended, and Perl-compatible regex support
Recursive Search — Search entire directory trees with -r
Color Output — Highlight matches with --color
Context Lines — Show lines before, after, or around matches (-B, -A, -C)
Invert Match — Show lines that do not match a pattern
Binary File Handling — Skip or search binary files intelligently