Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

grep vs grep -E

This comparison card contrasts grep and grep -E. grep is described as basic regex. grep -E is described as extended regex. The card pairs grep with simple words, and grep -E with patterns with OR.

grep vs grep -E: Basic regex.; Extended regex.
grep vs grep -E · Download PNG
Read card text

What this card says

Regex type

grep

Basic regex.

grep -E

Extended regex.

Key points

+ ? and OR need backslashes.

+ ? OR and {n} work directly.

Example

grep 'cat\(s\)\?' f

Use when

Simple words.

Patterns with OR.

See all AWS revision cards