Extrect selected entries from LDIF files like grep
ldif-extract is a small 'grep' like tool to extract and convert data from LDIF files. It could be used standalone or also in a pipe together with other tools like ldapsearch.
This utility will provide grep-like functionality to return multi-line (record) matches for blank-line deliminated files such as LDIF files used by LDAP. A match on any line will return all lines from the previous blank line until the following one.