From f22117796141e2510b13abce51f1f802020d73c7 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 19 Jul 2024 06:36:26 +0100 Subject: [PATCH] Build: remove use of egrep --- src/OS/Makefile-Default | 6 +++--- src/scripts/Configure-Makefile | 6 +++--- src/src/exiwhat.src | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/OS/Makefile-Default b/src/OS/Makefile-Default index 7481d3163..581b3ed5b 100644 --- a/src/OS/Makefile-Default +++ b/src/OS/Makefile-Default @@ -147,15 +147,15 @@ PCRE_LIBS=-lpcre2-8 # EXIWHAT_MULTIKILL_CMD= # EXIWHAT_MULTIKILL_ARG= -# (2) For other operating systems, exiwhat calls the ps command and egreps the +# (2) For other operating systems, exiwhat calls the ps command and greps the # output in order to find all the processes running Exim. The arguments for the # various commands needed to do this vary from OS to OS. These defaults work on # Solaris 2, HPUX, and IRIX. The OS-specific Makefiles have different versions # for other systems, and you can override with your own requirements in your # private Makefiles in the Local directory. The most commonly found # alternatives are -ax instead of -e for the ps argument, and / instead of a -# blank before the name exim for the egrep argument on systems whose ps output -# shows the full path name. The quotes for the egrep argument are specified +# blank before the name exim for the grep argument on systems whose ps output +# shows the full path name. The quotes for the grep argument are specified # here so that leading white space can be used. This value should always be # given in single quotes. diff --git a/src/scripts/Configure-Makefile b/src/scripts/Configure-Makefile index dc5015f6f..129f2a073 100755 --- a/src/scripts/Configure-Makefile +++ b/src/scripts/Configure-Makefile @@ -134,7 +134,7 @@ then sed "s/^/PKG_CONFIG_PATH='/" < ./$mftepcp2 | sed "s/\$/'/" > ./$mftepcp . ./$mftepcp export PKG_CONFIG_PATH - egrep -v "^[$st]*PKG_CONFIG_PATH[$st]*=" ./$mft > ./$mftt + grep -E -v "^[$st]*PKG_CONFIG_PATH[$st]*=" ./$mft > ./$mftt rm -f ./$mft ( echo "# Collapsed PKG_CONFIG_PATH in build-prep:" @@ -149,10 +149,10 @@ rm -f ./$mftepcp ./$mftepcp2 # handle pkg-config # beware portability of extended regexps with sed. -egrep "^[$st]*(AUTH|LOOKUP)_[A-Z0-9_]*[$st]*=[$st]*" $mft | \ +grep -E "^[$st]*(AUTH|LOOKUP)_[A-Z0-9_]*[$st]*=[$st]*" $mft | \ sed "s/[$st]*=/='/" | \ sed "s/\$/'/" > $mftt -egrep "^[$st]*((USE_(OPENSSL|GNUTLS)_PC)|SUPPORT_TLS|USE_GNUTLS|PCRE2?_CONFIG|AVOID_GNUTLS_PKCS11)[$st]*=[$st]*" $mft | \ +grep -E "^[$st]*((USE_(OPENSSL|GNUTLS)_PC)|SUPPORT_TLS|USE_GNUTLS|PCRE2?_CONFIG|AVOID_GNUTLS_PKCS11)[$st]*=[$st]*" $mft | \ sed "s/[$st]*=/='/" | \ sed "s/\$/'/" >> $mftt if test -s $mftt diff --git a/src/src/exiwhat.src b/src/src/exiwhat.src index 425e789ad..918908006 100644 --- a/src/src/exiwhat.src +++ b/src/src/exiwhat.src @@ -42,7 +42,7 @@ rm=RM_COMMAND multikill_cmd=EXIWHAT_MULTIKILL_CMD multikill_arg=EXIWHAT_MULTIKILL_ARG -# In other operating systems, Exim has to use "ps" and "egrep" to find the +# In other operating systems, Exim has to use "ps" and "grep" to find the # processes itself. In those cases, the next three variables are used: ps_cmd=EXIWHAT_PS_CMD @@ -133,7 +133,7 @@ if [ "$multikill_cmd" != "" ] && type "$multikill_cmd" >/dev/null 2>&1; then else $ps_cmd $ps_arg | \ - egrep "$egrep_arg" | \ + grep -E "$egrep_arg" | \ awk "{print \"kill $signal \"\$1}" | \ uniq | sh fi -- 2.30.2