From: Remi Gacogne Date: Tue, 16 Aug 2016 15:35:40 +0000 (+0200) Subject: Fix counting of `rec_control help` elements and grep syntax X-Git-Tag: rec-4.0.2~1^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d122f7dc28dde16d124ce8d69fc6f9ff80dd79af;p=pdns Fix counting of `rec_control help` elements and grep syntax --- diff --git a/regression-tests.recursor/rec_control-manpage/command b/regression-tests.recursor/rec_control-manpage/command index bbcaa9e77..89a127f5a 100755 --- a/regression-tests.recursor/rec_control-manpage/command +++ b/regression-tests.recursor/rec_control-manpage/command @@ -1,16 +1,16 @@ #!/bin/sh elements="$($RECCONTROL --config-dir=./configs/recursor-service help | grep -v -e '^ ' | awk '{print $1}')" -num_elems="$( echo $elements | wc -l)" +num_elems="$( echo "$elements" | wc -l)" if [ $num_elems -lt 5 ]; then - echo "Not enough elements" + echo "Not enough elements ($num_elems)" exit 1 fi missing_elements="" for element in $elements; do - grep -e -q "^$element" ../docs/manpages/rec_control.1.md || missing_elements="$element\n$missing_elements" + grep -q -e "^$element" ../docs/manpages/rec_control.1.md || missing_elements="$element\n$missing_elements" done if [ "x$missing_elements" != "x" ]; then