Skip to content

Commit 5b5f646

Browse files
ajdlinuxa-nogikh
authored andcommitted
all: replace egrep with grep -E
The egrep command has been deprecated in GNU Grep since 2007, and nowadays using egrep rather than grep -E will print a warning to the user, which is very annoying. Replace all usages of egrep with grep -E. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
1 parent 6309de2 commit 5b5f646

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

pkg/build/linux_gen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ set -eu
77
echo -en '// Code generated by pkg/build/linux.go. DO NOT EDIT.\n\n' > linux_generated.go
88
echo -en 'package build\n\n' >> linux_generated.go
99
echo -en 'const createImageScript = `#!/bin/bash\n' >> linux_generated.go
10-
cat ../../tools/create-gce-image.sh | egrep -v '^\s*#' >> linux_generated.go
10+
cat ../../tools/create-gce-image.sh | grep -E -v '^\s*#' >> linux_generated.go
1111
echo -en '`\n\n' >> linux_generated.go

sys/linux/bpf_trace.txt

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sys/linux/init_alg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ var allTypes = []algType{
124124

125125
// Algorithms can be extracted with something along the following lines:
126126
//
127-
// cat /proc/crypto | grep -B 8 ": skcipher" | grep -B 7 "internal : no" | egrep "name |driver " | \
127+
// cat /proc/crypto | grep -B 8 ": skcipher" | grep -B 7 "internal : no" | grep -E "name |driver " | \
128128
// cut -b 16- | sort | uniq | awk '{printf("{\"%s\", nil},\n", $1)}'
129129
//
130130
// Note: the kernel needs to include all crypto configs and CPU needs to support AVX/NEON/etc.

tools/check-copyright.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ FILES=0
66
FAILED=""
77
for F in $(find . -name "*.go" -o -name "*.sh" -o -name "*.cpp" -o -name "*.cc" -o -name "*.h" \
88
-o -name "*.S" -o -name "*.py" -o -name "*.yml" -o -name "*.yaml" -o -name "*.fbs" \
9-
-o \( -path "./sys/*/*.txt" \) | egrep -v "/_include/|/gen/|/testdata/"); do
9+
-o \( -path "./sys/*/*.txt" \) | grep -E -v "/_include/|/gen/|/testdata/"); do
1010
((FILES+=1))
11-
cat $F | tr '\n' '_' | egrep "(//|#) Copyright 20[0-9]{2}(/20[0-9]{2})? syzkaller project authors\. All rights reserved\._(//|#) Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file\." >/dev/null
11+
cat $F | tr '\n' '_' | grep -E "(//|#) Copyright 20[0-9]{2}(/20[0-9]{2})? syzkaller project authors\. All rights reserved\._(//|#) Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file\." >/dev/null
1212
if [ $? -eq 0 ]; then continue; fi
1313
# Ignore auto-generated files.
14-
egrep "^(//|#) Code generated .* DO NOT EDIT\\.|(WARNING: This file is machine generated)|automatically generated by the FlatBuffers compiler" $F >/dev/null
14+
grep -E "^(//|#) Code generated .* DO NOT EDIT\\.|(WARNING: This file is machine generated)|automatically generated by the FlatBuffers compiler" $F >/dev/null
1515
if [ $? -eq 0 ]; then continue; fi
1616
# Ignore untracked files.
1717
git ls-files --error-unmatch $F >/dev/null 2>&1

tools/check-language.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FAILED=""
77
shopt -s nocasematch
88
for F in $(find . -name "*.go" -o -name "*.sh" -o -name "*.cc" -o -name "*.md" \
99
-o -name "*.S" -o -name "*.py" -o -name "*.yml" -o -name "*.yaml" | \
10-
egrep -v "/gen/|executor/syscalls.h|dashboard/config/linux/bits|pkg/csource/generated.go|tools/check-language.sh"); do
10+
grep -E -v "/gen/|executor/syscalls.h|dashboard/config/linux/bits|pkg/csource/generated.go|tools/check-language.sh"); do
1111
((FILES+=1))
1212
L=0
1313
while IFS= read -r LINE; do

tools/check-shebang.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
FAILED=""
66
FILES=0
7-
for F in $(find . -perm -u=x -type f | egrep -v "/gen/|/.git"); do
7+
for F in $(find . -perm -u=x -type f | grep -E -v "/gen/|/.git"); do
88
((FILES+=1))
9-
if head -n 1 "$F" | egrep -q '^#!/' && head -n 1 "$F" | egrep -v -q -e '^#!/bin/sh$' -e '^#!/usr/bin/env '; then
9+
if head -n 1 "$F" | grep -E -q '^#!/' && head -n 1 "$F" | grep -E -v -q -e '^#!/bin/sh$' -e '^#!/usr/bin/env '; then
1010
echo "$F: Non-portable shebang line. Please use /usr/bin/env to locate the interpreter."
1111
FAILED=1
1212
fi

tools/check-whitespace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FAILED=""
77
RE="[[:space:]]$"
88
LAST_EMPTY=""
99
for F in $(find . -name "*.sh" -o -name "*.S" -o -name "*.py" -o -name "*.yml" -o -name "*.yaml" -o -name "*.md" | \
10-
egrep -v "/gen/"); do
10+
grep -E -v "/gen/"); do
1111
((FILES+=1))
1212
L=0
1313
while IFS= read -r LINE; do

0 commit comments

Comments
 (0)