From 2837ffe8d8a48cb321842721a8531ed870ace1d3 Mon Sep 17 00:00:00 2001 From: kxxt Date: Sat, 1 Oct 2022 00:19:12 +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: Iea1ca9ae72264530c67727b5e27cf1b7a362dd97 GitHub-Last-Rev: 3584884bd48cca97271ab86010fce8e4e063c0e4 GitHub-Pull-Request: golang/go#55299 Reviewed-on: https://go-review.googlesource.com/c/go/+/432256 TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor Reviewed-by: Carlos Amedee Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- src/buildall.bash | 2 +- src/syscall/mkerrors.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/buildall.bash b/src/buildall.bash index 7b3751f42e..e4e3ec37ec 100755 --- a/src/buildall.bash +++ b/src/buildall.bash @@ -41,7 +41,7 @@ gettargets() { } selectedtargets() { - gettargets | egrep "$pattern" + gettargets | grep -E "$pattern" } # put linux first in the target list to get all the architectures up front. diff --git a/src/syscall/mkerrors.sh b/src/syscall/mkerrors.sh index f7d37279ed..ddd55332ef 100755 --- a/src/syscall/mkerrors.sh +++ b/src/syscall/mkerrors.sh @@ -342,7 +342,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 ) @@ -352,7 +352,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' "$@" -- 2.48.1