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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user