-D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' >$SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success (got $COUNT entries)"
-D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success (got $COUNT entries)"
-D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success (got $COUNT entries)"
-D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
-D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
'(uid=uncheckedlimited)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
-D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
-D 'cn=Unchecked Limited User 2,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
-D 'cn=Foo User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Bar User,ou=People,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Unchecked Limited Users,ou=Groups,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Unchecked Limited User 3,ou=Admin,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Special User,o=University of Michigan,c=US' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null >$SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success (got $COUNT entries)"
-D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success (got $COUNT entries)"
-D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success (got $COUNT entries)"
-D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
-D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
-D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(uid=uncheckedlimited)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
-D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
-D 'cn=Unlimited User,ou=Paged Results Users,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
-D 'cn=Page Size Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side page size limit (got $COUNT entries)"
-D 'cn=Paged Results Disabled User,ou=Paged Results Users,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
-D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
-D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
-z $SIZELIMIT -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side unchecked limit (got $COUNT entries)"
-D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
-z $SIZELIMIT -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | awk '{print $3}'`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side unchecked limit (got $COUNT entries)"