diff --git a/Makefile.coq.local b/Makefile.coq.local
index 3f39fd3d787182a18735863023924f15f3b2b659..500616cd5496d33ddb4e8e42c7a810e321ebbe2a 100644
--- a/Makefile.coq.local
+++ b/Makefile.coq.local
@@ -29,7 +29,7 @@ COQ_TEST=$(COQTOP) $(COQDEBUG) -batch -test-mode
 # These versions of Coq are known to have different output so we don't test them.
 # Need to make this a lazy variable (`=` instead of `:=`) since COQ_VERSION is only set later.
 # Make sure to recognize both 8.19.0 and 8.19+alpha.
-COQ_NOREF=$(shell echo "$(COQ_VERSION)" | egrep "^8\.19[.+]" -q && echo 1)
+COQ_NOREF=$(shell echo "$(COQ_VERSION)" | grep -E "^8\.19[.+]" -q && echo 1)
 
 tests/.coqdeps.d: $(TESTFILES)
 	$(SHOW)'COQDEP TESTFILES'