From: Tom Krizek Date: Thu, 6 Apr 2023 14:33:06 +0000 (+0200) Subject: Replace egrep with grep -E in rpz tests X-Git-Tag: v9.19.13~40^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c977b0c81d5f9308529930adf4658c087a30c2eb;p=thirdparty%2Fbind9.git Replace egrep with grep -E in rpz tests GNU Grep 3.8 reports the following warnings: egrep: warning: egrep is obsolescent; using grep -E --- diff --git a/bin/tests/system/rpz/tests.sh b/bin/tests/system/rpz/tests.sh index a18064d3d9a..dac6b6b5b26 100644 --- a/bin/tests/system/rpz/tests.sh +++ b/bin/tests/system/rpz/tests.sh @@ -294,7 +294,7 @@ add_librpz_rule() { produce_librpz_rules() { # echo "Producing rules for $1" ZONEFILE=$1/$3.db - cat $ZONEFILE | egrep -v '^;' | egrep '\<(A|CNAME)\>' | awk -v zone=$2 '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE + cat $ZONEFILE | grep -E -v '^;' | grep -E '\<(A|CNAME)\>' | awk -v zone=$2 '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE } # $1=message diff --git a/bin/tests/system/rpzrecurse/tests.sh b/bin/tests/system/rpzrecurse/tests.sh index aea2701954d..a5802bc0e2d 100644 --- a/bin/tests/system/rpzrecurse/tests.sh +++ b/bin/tests/system/rpzrecurse/tests.sh @@ -66,13 +66,13 @@ start_server_rules() { cat $FCONF | grep 'zone ' | grep ' primary' | while read LINE; do ZONE=`echo $LINE | sed 's/.*zone "//g' | awk -F '"' '{print $1}'`; DBFILE=`echo $LINE | sed 's/.*file "//g' | awk -F '"' '{print $1}'`; - cat ns2/$DBFILE | egrep -v '^;' | egrep '\<(A|CNAME)\>' | awk -v zone=$ZONE '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE + cat ns2/$DBFILE | grep -E -v '^;' | grep -E '\<(A|CNAME)\>' | awk -v zone=$ZONE '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE done } produce_librpz_rules() { ZONEFILE=$1/$3.db - cat $ZONEFILE | egrep -v '^;' | egrep '\<(A|CNAME)\>' | awk -v zone=$2 '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE + cat $ZONEFILE | grep -E -v '^;' | grep -E '\<(A|CNAME)\>' | awk -v zone=$2 '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE } run_query() {