From 84dc82d7e8757e9f77fbe9586bd2670e805777d9 Mon Sep 17 00:00:00 2001 From: kxxt Date: Sat, 1 Oct 2022 00:15:39 +0000 Subject: [PATCH] all: use grep -E/-F instead of fgrep/egrep egrep and fgrep are obsolescent now. This PR updates all egrep and fgrep commands to grep -E and grep -F. Running egrep/fgrep command with grep v3.8 will output the following warning to stderr: egrep: warning: egrep is obsolescent; using grep -E see also: https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html Change-Id: I0c6b6a039063d6aee94e8500971001996d4e498c GitHub-Last-Rev: 1eee6147666503d274b244a65daa58cded466704 GitHub-Pull-Request: golang/sys#137 Reviewed-on: https://go-review.googlesource.com/c/sys/+/432835 Reviewed-by: Tobias Klauser Reviewed-by: Ian Lance Taylor Reviewed-by: Carlos Amedee Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot --- plan9/mkerrors.sh | 4 ++-- unix/mkerrors.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plan9/mkerrors.sh b/plan9/mkerrors.sh index 85309c4a..526d04ab 100755 --- a/plan9/mkerrors.sh +++ b/plan9/mkerrors.sh @@ -126,7 +126,7 @@ errors=$( signals=$( echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | + grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' | sort ) @@ -136,7 +136,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags | sort >_error.grep echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | + grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' | sort >_signal.grep echo '// mkerrors.sh' "$@" diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index 2ab44aa6..7456d9dd 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh @@ -642,7 +642,7 @@ errors=$( signals=$( echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | + grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | sort ) @@ -652,7 +652,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags | sort >_error.grep echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | + grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | sort >_signal.grep echo '// mkerrors.sh' "$@"