Corrected the initial note about the necessity of the -E option in grep. The original note suggested that without -E, grep would treat patterns as literal strings, which is wrong.
Added brief explanations differentiating between Extended Regular Expressions (EREs) and Basic Regular Expressions (BREs). By default, grep operates with BRE, but with the -E flag, it switches to using ERE.
Provided an example of how to achieve equivalent results using BRE with the -G flag.
-E
option ingrep
. The original note suggested that without-E
,grep
would treat patterns as literal strings, which is wrong.grep
operates with BRE, but with the-E
flag, it switches to using ERE.-G
flag.