From 6cb792fe9326bc2d4216afed0f826297dd32e42a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 24 Apr 2021 17:40:51 +0100 Subject: [PATCH] ITS#9535 avoid non-portable wc format Use awk to count lines instead --- tests/scripts/test078-persistent-sessionlog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scripts/test078-persistent-sessionlog b/tests/scripts/test078-persistent-sessionlog index 3877d39426..62ea76946f 100755 --- a/tests/scripts/test078-persistent-sessionlog +++ b/tests/scripts/test078-persistent-sessionlog @@ -610,9 +610,9 @@ $LDIFFILTER -s a < $TESTDIR/server$n.out > $TESTDIR/server$n.flt echo "Checking server $n can remember which entries have been deleted even after it's been restarted..." $LDAPRSEARCH -b "$BASEDN" -D "$MANAGERDN" -H $URI -w $PASSWD \ - -E "sync=ro/$cookie" 'objectclass=*' 1.1 | grep syncUUIDs | wc -l >$TESTDIR/repl.out + -E "sync=ro/$cookie" 'objectclass=*' 1.1 | awk '/syncUUIDs/ {count++} END {print count}' >$TESTDIR/repl.out $LDAPRSEARCH -b "$BASEDN" -D "$MANAGERDN" -H $URI -w $PASSWD \ - -E "sync=ro/$cookie" 'objectclass=*' 1.1 | grep SyncDone | grep "refreshDeletes=1" | wc -l >>$TESTDIR/repl.out + -E "sync=ro/$cookie" 'objectclass=*' 1.1 | grep SyncDone | awk '/refreshDeletes=1/ {count++} END {print count}' >>$TESTDIR/repl.out $CMP $TESTDIR/repl.out $TESTDIR/repl.test > $CMPOUT