use grep instead of the deprecated egrep (#46706)
grep -E is the new (since POSIX) way to use the "extended" regexp.
The latest GNU Grep release complains each time egrep is invoked (egrep
is implemented as just a wrapper script around grep).
See:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html
https://www.gnu.org/software/grep/manual/grep.html
Fixes #46649