]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/subfilter.sh
another try at fixing test011
[openldap] / tests / scripts / subfilter.sh
index ebc4978ad12d794acba62e2751c5b2ab3a2bd8d6..37c60227808e8821ca8aa4ebe533044b24848d58 100755 (executable)
@@ -1,10 +1,6 @@
 #! /bin/sh
 #
-# Strip entries that belong to subtree $2 (if any)
+# Strip entries that belong to subtree $1
 #
-if test $# == 0 ; then
-       exit 1
-else
-       awk "/^dn:/&&!/$1\$/ {while (\$1!=\"\") {print \$0;getline} print \"\"}"
-fi
+awk '/^dn:/ && !/'"$1"'$/ {while ($0 != "") {print $0; getline} print ""}'