ldifsort.pl - Sorts an LDIF file by the specified key attribute. The sorted version is written to standard output.
Sorts an LDIF file by the specified key attribute.
ldifsort.pl -k keyattr [-acdhn] file.ldif
Specifies the key attribute for making sort comparisons. If 'dn' is specified, sorting is done by the full DN string, which can be composed of different attributes for different entries.
Specifies that attributes within a given entry should also be sorted. This has the side effect of removing all comments and line continuations in the LDIF file.
Specifies case-insensitive comparisons on the key attribute. This is the default behavior if 'dn' is passed as the argument to -k.
Specifies that the key attribute is a DN. Comparisons are done on a DN-normalized version of attribute values. This is the default behavior if 'dn' is passed as the argument to -k.
When the key attribute is a DN, sorts hierarchically superior values before subordinate values. For example, dc=example,dc=com is sorted before cn=test,dc=example,dc=com.
Specifies numeric comparisons on the key attribute. Otherwise string comparisons are done.
Kartik Subbarao <firstname.lastname@example.org>