echo "Testing no limits requested for unlimited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' >$SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success (got $COUNT entries)"
SIZELIMIT=2
echo "Testing size limit request ($SIZELIMIT) for unlimited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success (got $COUNT entries)"
TIMELIMIT=10
echo "Testing time limit request ($TIMELIMIT s) for unlimited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -l $TIMELIMIT \
- -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success (got $COUNT entries)"
echo "Testing no limits requested for soft limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
SIZELIMIT=2
echo "Testing lower than soft limit request ($SIZELIMIT) for soft limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
SIZELIMIT=100
echo "Testing higher than soft limit request ($SIZELIMIT) for soft limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
SIZELIMIT=2
echo "Testing lower than hard limit request ($SIZELIMIT) for hard limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Hard Limited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
SIZELIMIT=100
echo "Testing higher than hard limit request ($SIZELIMIT) for hard limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Hard Limited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
echo "Testing lower than unchecked limit request for unchecked limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unchecked Limited User,ou=People,dc=example,dc=com' \
'(uid=uncheckedlimited)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
echo "Testing higher than unchecked limit requested for unchecked limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unchecked Limited User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
echo "Testing no limits requested for unchecked limited group..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unchecked Limited User 2,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unchecked Limited User 2,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
echo "Testing no limits requested for limited regex..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Foo User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Foo User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
echo "Testing no limits requested for limited onelevel..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Bar User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Bar User,ou=People,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
echo "Testing no limit requested for limited children..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unchecked Limited Users,ou=Groups,o=University of Michigan,c=US' \
+ -D 'cn=Unchecked Limited Users,ou=Groups,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
echo "Testing no limit requested for limited subtree..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unchecked Limited User 3,ou=Admin,o=University of Michigan,c=US' \
+ -D 'cn=Unchecked Limited User 3,ou=Admin,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
echo "Testing no limit requested for limited users..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Special User,o=University of Michigan,c=US' \
+ -D 'cn=Special User,dc=example,dc=com' \
'(objectClass=*)' > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
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=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
PAGESIZE=5
echo "Testing no limits requested for unlimited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null >$SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success (got $COUNT entries)"
SIZELIMIT=2
echo "Testing size limit request ($SIZELIMIT) for unlimited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success (got $COUNT entries)"
TIMELIMIT=10
echo "Testing time limit request ($TIMELIMIT s) for unlimited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -l $TIMELIMIT \
- -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success (got $COUNT entries)"
echo "Testing no limits requested for soft limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
SIZELIMIT=2
echo "Testing lower than soft limit request ($SIZELIMIT) for soft limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
SIZELIMIT=100
echo "Testing higher than soft limit request ($SIZELIMIT) for soft limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
SIZELIMIT=2
echo "Testing lower than hard limit request ($SIZELIMIT) for hard limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Hard Limited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
SIZELIMIT=100
echo "Testing higher than hard limit request ($SIZELIMIT) for hard limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
- -D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Hard Limited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
echo "Testing lower than unchecked limit request for unchecked limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unchecked Limited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(uid=uncheckedlimited)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
echo "Testing higher than unchecked limit requested for unchecked limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
+ -D 'cn=Unchecked Limited User,ou=People,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
echo "Testing no limit requested for unlimited page size ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Unlimited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+ -D 'cn=Unlimited User,ou=Paged Results Users,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
echo "Testing no limit requested for limited page size ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Page Size Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+ -D 'cn=Page Size Limited User,ou=Paged Results Users,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side page size limit (got $COUNT entries)"
echo "Testing no limit requested for pagedResults disabled ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Paged Results Disabled User,ou=Paged Results Users,o=University of Michigan,c=US' \
+ -D 'cn=Paged Results Disabled User,ou=Paged Results Users,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
echo "Testing no limit requested for pagedResults total count limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+ -D 'cn=Paged Results Limited User,ou=Paged Results Users,dc=example,dc=com' \
-E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
SIZELIMIT=8
echo "Testing higher than hard but lower then total count limit requested for pagedResults total count limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+ -D 'cn=Paged Results Limited User,ou=Paged Results Users,dc=example,dc=com' \
-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=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side unchecked limit (got $COUNT entries)"
SIZELIMIT=15
echo "Testing higher than total count limit requested for pagedResults total count limited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
- -D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+ -D 'cn=Paged Results Limited User,ou=Paged Results Users,dc=example,dc=com' \
-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=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side unchecked limit (got $COUNT entries)"