Sort attributes by name for each entry in ldapsearch output (ldap database export)
I need to sort attributes by name for each entry in ldapsearch output
(-S "" sort entries by name, but not their attributes)
I need this to compare consistency of 2 ldap databases after the wan connection link up (in multimaster configuration). Because the time of writing for each attribute could differ, the order could not be the same.
My "export" script
HOSTNAME=localhost
BINDDN="cn=manager,dc=example,dc=com"
BASE="dc=example,dc=com"
PASSWORD=`cat /etc/ldap.secret`
/usr/bin/ldapsearch -LLL -x -h $HOSTNAME -D "$BINDDN" -w "$PASSWORD" -b "$BASE" -S ""
Thanks in advance.
Leandro.
|