$grep
Search for matching string patterns or regular expressions inside text files.
Sponsored AdvertisementAdSense Slot (banner)
Command Syntax
grep [OPTIONS] PATTERN [FILE...]
Try `grep` Live in Terminal
bash — terminal
AST Sandbox (Free)
Overview & Usage Details
Grep (Global Regular Expression Print) is the standard Unix search utility. It scans input lines matching a specified pattern and prints them to standard output.
Command Options & Flags
| Option / Flag | Description |
|---|---|
| -i | Ignore case distinctions in patterns and input files. |
| -n | Prefix each line of output with its 1-based line number. |
| -v | Invert match: select non-matching lines. |
| -c | Suppress normal output and print a count of matching lines. |
Sponsored AdvertisementAdSense Slot (leaderboard)