public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 8/8] contrib: use grep -E instead of egrep
Date: Fri, 24 Jun 2022 15:10:24 +0800	[thread overview]
Message-ID: <d805952962cde12c96eb5aa056cdfa34d08466cf.camel@xry111.site> (raw)
In-Reply-To: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site>

egrep has been deprecated in favor of grep -E for a long time, and the
next grep release (3.8 or 4.0) will print a warning of egrep is used.
Stop using egrep so we won't see the warning.

contrib/ChangeLog:

	* check_GNU_style.sh: Use grep -E instead of egrep.
	* test_summary: Likewise.
	* warn_summary: Likewise.
---
 contrib/check_GNU_style.sh | 10 +++++-----
 contrib/test_summary       |  2 +-
 contrib/warn_summary       |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
index fb7494661ee..535be65f063 100755
--- a/contrib/check_GNU_style.sh
+++ b/contrib/check_GNU_style.sh
@@ -113,7 +113,7 @@ g (){
 
     local found=false
     cat $inp \
-	| egrep $color -- "$arg" \
+	| grep -E $color -- "$arg" \
 	> "$tmp" && found=true
 
     if $found; then
@@ -130,8 +130,8 @@ ag (){
 
     local found=false
     cat $inp \
-	| egrep $color -- "$arg1" \
-	| egrep $color -- "$arg2" \
+	| grep -E $color -- "$arg1" \
+	| grep -E $color -- "$arg2" \
 	> "$tmp" && found=true
 
     if $found; then
@@ -148,8 +148,8 @@ vg (){
 
     local found=false
     cat $inp \
-	| egrep -v -- "$varg" \
-	| egrep $color -- "$arg" \
+	| grep -E -v -- "$varg" \
+	| grep -E $color -- "$arg" \
 	> "$tmp" && found=true
 
     if $found; then
diff --git a/contrib/test_summary b/contrib/test_summary
index 5760b053ec2..30494077aaa 100755
--- a/contrib/test_summary
+++ b/contrib/test_summary
@@ -77,7 +77,7 @@ for file in $files; do
     { $anychange ||
       anychange=`diff $file.sent $file 2>/dev/null |
 	if test ! -f $file.sent ||
-	   egrep '^[<>] (XPASS|FAIL)' >/dev/null; then
+	   grep -E '^[<>] (XPASS|FAIL)' >/dev/null; then
 	    echo true
 	else
 	    echo false
diff --git a/contrib/warn_summary b/contrib/warn_summary
index d4c8b6cdb19..eb88437e79d 100755
--- a/contrib/warn_summary
+++ b/contrib/warn_summary
@@ -57,7 +57,7 @@ subdirectoryFilter()
   else
     if test "$filter" = nosub ; then
       # Omit all subdirectories.
-      egrep -v '/gcc/(ch|cp|f|fortran|ada|intl|fixinc)/'
+      grep -E -v '/gcc/(ch|cp|f|fortran|ada|intl|fixinc)/'
     else
       # Pass through only subdir $filter.
       grep "/gcc/$filter/"
-- 
2.36.1



  parent reply	other threads:[~2022-06-24  7:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24  6:57 [PATCH 0/8] Stop using obsoleted egrep/fgrep Xi Ruoyao
2022-06-24  6:58 ` [PATCH 1/8] config: use grep -E instead of egrep Xi Ruoyao
2022-06-24  7:00 ` [PATCH 2/8] fixincludes: use grep -E/-F instead of egrep/fgrep Xi Ruoyao
2022-06-24  7:02 ` [PATCH 3/8] libstdc++: use grep -E instead of egrep in scripts Xi Ruoyao
2022-06-24 10:00   ` Jonathan Wakely
2022-06-24 11:08     ` Xi Ruoyao
2022-06-24 11:18       ` Jonathan Wakely
2022-06-24 11:35         ` Jonathan Wakely
2022-06-24 11:41           ` Rainer Orth
2022-06-24 12:37             ` Xi Ruoyao
2022-06-24 12:38               ` Jonathan Wakely
2022-06-24  7:04 ` [PATCH 4/8] libbacktrace: use grep -F instead of fgrep Xi Ruoyao
2022-06-24  7:05 ` [PATCH 5/8] intl: stop using fgrep for exgettext Xi Ruoyao
2022-06-24 16:06   ` Joseph Myers
2022-06-25  4:00     ` Xi Ruoyao
2022-06-24  7:06 ` [PATCH 6/8] fortran: use grep -F instead of fgrep Xi Ruoyao
2022-06-24 11:13   ` Bernhard Reutner-Fischer
2022-06-24 12:22     ` Xi Ruoyao
2022-06-24 12:35       ` Rainer Orth
2022-06-24 18:30         ` Bernhard Reutner-Fischer
2022-06-24 13:58       ` Thomas Koenig
2022-06-24  7:09 ` [PATCH 7/8] testsuite: use grep -E instead of egrep Xi Ruoyao
2022-06-24 10:57   ` Arnaud Charlet
2022-06-24  7:10 ` Xi Ruoyao [this message]
2022-06-24  7:24 ` [PATCH 0/8] Stop using obsoleted egrep/fgrep Rainer Orth
2022-06-24  7:27   ` Xi Ruoyao
2022-06-24  7:50     ` Rainer Orth
2022-06-24  8:26       ` Fangrui Song
2022-06-24  8:33         ` Andrew Pinski
2022-06-24 16:09           ` Joseph Myers
2022-06-24 16:21             ` Iain Sandoe
2022-06-24  8:45         ` Rainer Orth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d805952962cde12c96eb5aa056cdfa34d08466cf.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).