Search⌘ K
AI Features

GREP vs. EGREP vs. FGREP

Explore how to use grep, egrep, and fgrep to search text efficiently in Bash. Understand their options, when to use fixed strings or regular expressions, and how these commands help locate patterns in files and directories.

grep

Definition:

The command grep stands for “global regular expression print”, and is used to search for specified text patterns in files or program outputs.

Syntax:

grep [option(s)] pattern [file(s)]

Options:

Option Description
-E (extended regexp) Causes grep to behave like egrep.
-F (fixed strings) Causes grep to behave
...