awk distinguish between use of
ERE ? For
sed there is the
-E option one can use.
Get the book Effective AWK Programming, 5th Edition, by Arnold Robbins to start learning about awk.– Ed MortonFeb 1 at 13:43
It does not need to distinguish between the two since regular expressions in
awk are always POSIX extended regular expressions.
From the POSIX specification for
The awk utility shall make use of the extended regular expression notation [...]
I'm not aware of any
awk implementation that introduces a non-standard option for switching to POSIX basic regular expressions.
sed utility always uses POSIX basic regular expressions unless you use it with its (so far) non-standard but fairly commonly available
-E option. The
grep utility also defaults to POSIX basic regular expressions, but the
-E option that enables it to use POSIX extended regular expressions is actually standard (while
-P for Perl-compatible regular expressions, PCRE, is non-standard and not commonly implemented on non-GNU systems). The
grep utility can additionally interpret the given expressions as plain strings with its standard