Use $(...) notation for subshells in system tests

The changes were mostly done with sed:

find . -name '*.sh' | xargs sed -i 's/`\([^`]*\)`/$(\1)/g'

There have been a few manual changes where the regex wasn't sufficient
(e.g. backslashes inside the `...`) or wrong (`...` referring to docs or
in comments).
This commit is contained in:
Tom Krizek
2023-06-26 18:35:04 +02:00
parent d203681a75
commit 05baf7206b
52 changed files with 418 additions and 416 deletions

View File

@@ -83,12 +83,12 @@ echo_i "checking server config entry ($n)"
ret=0
n=$((n + 1))
$RNDCCMD stats
oka=`grep "EDNS TCP keepalive option received" ns2/named.stats | \
tail -1 | awk '{ print $1}'`
oka=$(grep "EDNS TCP keepalive option received" ns2/named.stats | \
tail -1 | awk '{ print $1}')
$DIG $DIGOPTS bar.example @10.53.0.3 > dig.out.test$n
$RNDCCMD stats
nka=`grep "EDNS TCP keepalive option received" ns2/named.stats | \
tail -1 | awk '{ print $1}'`
nka=$(grep "EDNS TCP keepalive option received" ns2/named.stats | \
tail -1 | awk '{ print $1}')
#echo oka ':' $oka
#echo nka ':' $nka
if [ "$oka" -eq "$nka" ]; then ret=1; fi