From: Charles-Henri Bruyand Date: Thu, 26 Jul 2018 07:30:12 +0000 (+0200) Subject: recursor tests: replace awk command by perl X-Git-Tag: dnsdist-1.3.3~170^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1bd2b0d8c94eec1a5908256110c5396296646065;p=pdns recursor tests: replace awk command by perl --- diff --git a/build-scripts/test-recursor b/build-scripts/test-recursor index 0fcfc9db7..0f27b721e 100755 --- a/build-scripts/test-recursor +++ b/build-scripts/test-recursor @@ -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}"