]> Cypherpunks repositories - gostls13.git/commitdiff
all: use grep -E/-F instead of fgrep/egrep
authorkxxt <rsworktech@gmail.com>
Sat, 1 Oct 2022 00:19:12 +0000 (00:19 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 6 Oct 2022 21:22:22 +0000 (21:22 +0000)
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 <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/buildall.bash
src/syscall/mkerrors.sh

index 7b3751f42e9370e40a47427f78d8f1b6743c6ba8..e4e3ec37ec4c9f167abbbd74b169d8d9207d14e6 100755 (executable)
@@ -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.
index f7d37279ed997e67c11bed9d8213b76a1665dc97..ddd55332efd5e23fcbfcd50fe32eea86639ff1ed 100755 (executable)
@@ -342,7 +342,7 @@ errors=$(
 signals=$(
        echo '#include <signal.h>' | $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 <errno.h>' | $CC -x c - -E -dM $ccflags |
        sort >_error.grep
 echo '#include <signal.h>' | $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' "$@"