Search and Filtering

egrep

Searches with extended regular expressions.

egrep is traditionally equivalent to grep -E. Modern documentation often recommends using grep -E directly.

Syntax
egrep pattern [file...]

Arguments explained

  • Options adjust output or behavior.
  • Arguments name the files, services, hosts, or values the command should work with.

Common examples

Match alternatives
egrep 'error|fail|warn' app.log

Finds lines matching any of the alternatives.

Preferred modern form
grep -E 'error|fail|warn' app.log

Uses grep's extended regex option explicitly.

egrep Command
FieldDetails
Commandegrep
CategorySearch and Filtering
Primary useSearches with extended regular expressions.
Syntaxegrep pattern [file...]