Open lufia opened 1 year ago
Not all systems use GNU grep, however, and the world as a whole does not seem to be in a rush to get rid of egrep
. I find the warnings annoying; some uses of egrep
can probably just be replaced with grep
(without the -E
) which would, at least, cut down on the noise.
On the other hand, grep -E
does seem to be in POSIX (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) so it may be sufficiently portable, and POSIX does make a note about the intention to combine grep
, egrep
and fgrep
into a single command. However, I am not sure that everything that plan9port supports has gotten the memo yet.
According to https://9fans.github.io/plan9port/
Linux (x86, x86-64, PowerPC, and ARM), FreeBSD (x86, x86-64), Mac OS X (x86, x86-64, and Power PC), NetBSD (x86 and PowerPC), OpenBSD (x86 and PowerPC), SunOS (x86-64 and Sparc), Dragonfly BSD (x86-64).
I checked grep supports -E option nowadays on several systems:
The -E
option means to allow extended regexp in all implementations of grep(1).
This PR fixes #587
I noticed egrep always output warning:
I heared this warning may be introduced in GNU Grep v3.8.