diff -ur a/qpdf/qtest/qpdf/diff-encrypted b/qpdf/qtest/qpdf/diff-encrypted
--- a/qpdf/qtest/qpdf/diff-encrypted	2023-04-10 14:03:24.943059112 +0000
+++ b/qpdf/qtest/qpdf/diff-encrypted	2023-04-10 14:04:26.012776963 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | egrep -v '(Date|InstanceID)' | wc -l))
+lines=$(expr 0 + $(diff "$1" "$2" | grep -E '^[<>]' | grep -E -v '(Date|InstanceID)' | wc -l))
 if [ "$lines" = "0" ]; then
    echo okay
 else
diff -ur a/qpdf/qtest/qpdf/diff-ignore-ID-version b/qpdf/qtest/qpdf/diff-ignore-ID-version
--- a/qpdf/qtest/qpdf/diff-ignore-ID-version	2023-04-10 14:03:24.939059262 +0000
+++ b/qpdf/qtest/qpdf/diff-ignore-ID-version	2023-04-10 14:04:51.635819337 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
-lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | \
-        egrep -v '/ID' | egrep -v '%PDF-' | wc -l))
+lines=$(expr 0 + $(diff "$1" "$2" | grep -E '^[<>]' | \
+        grep -E -v '/ID' | grep -E -v '%PDF-' | wc -l))
 if [ "$lines" = "0" ]; then
    echo okay
 else