If you run a search designed to count the entries that satisfy a filter at the base level, the search result is either 1 or 0. This can be useful if you run the search programmatically.
The following example shows how to check whether the organization attribute of the Democorp base entry includes the letter "c".
To check whether the base object matches a search filter
dxsearch -h computer-name -p 19389 -s base -b "o=DEMOCORP,c=AU" (o="*c*") dxEntryCount
In this search, computer-name is the computer that contains the Democorp DSA.
o=DEMOCORP,c=AU dxEntryCount=1
This search result indicates that the organization attribute for the Democorp base object does include the letter c.
Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |