]> granicus.if.org Git - pdns/commitdiff
recursor tests: replace awk command by perl
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 26 Jul 2018 07:30:12 +0000 (09:30 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 26 Jul 2018 07:30:12 +0000 (09:30 +0200)
build-scripts/test-recursor

index 0fcfc9db7cceb80a792887f66f8bdb9a783d5863..0f27b721e1570933060f0c807f973769c4a31b8f 100755 (executable)
@@ -46,7 +46,7 @@ sleep 3
 svstat configs/*
 ## prints the logs of supervised processes reported as running for less than 3 secs
 for config in configs/* ; do
-    secs=$(svstat ${config} | awk 'match($0, /([0-9]+) seconds/, r) { print r[1] }')
+    secs=$(svstat ${config} | perl -pe 's!.+(\d+) seconds!\1!')
     if [ -n "${secs}" ] && [ ${secs} -lt 3 ] ; then
         echo "-----------------"
         echo "Logs of ${config}"