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

@@ -301,9 +301,9 @@ sub=$!
$DIG -p ${PORT} ixfr=0 large @10.53.0.3 > dig.out.test$n
kill $sub
)
lines=`grep hostmaster.large dig.out.test$n | wc -l`
lines=$(grep hostmaster.large dig.out.test$n | wc -l)
test ${lines:-0} -eq 2 || ret=1
messages=`sed -n 's/^;;.*messages \([0-9]*\),.*/\1/p' dig.out.test$n`
messages=$(sed -n 's/^;;.*messages \([0-9]*\),.*/\1/p' dig.out.test$n)
test ${messages:-0} -gt 1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status+ret))