[Date Prev][Date Next]
Re: Sorting the LDAPSEARCH output
At 03:03 PM 3/7/00 -0500, Patrick Timmons wrote:
>I think what Antonin means is how to sort the attributes in a record to
>show them in a standard way.
My answer still applies: "sort the output."
>When you create an entry, openldap puts the
>attributes in the order you gave it.
Sequences of attributes and their values do not have order.
>After a couple of modifies, the
>attribute order is completely different.
A robust client should not rely on servers maintaining any
particular order over what are defined as unordered sequences.
If your client wants to present the attributes and their values
in some order, it should order them itself.
[Note: some LDAPv3 servers may support experimental or proprietary
server side sort controls. OpenLDAP 1.x, being an LDAPv2+
implementation, does not support these controls].
>"Kurt D. Zeilenga" wrote:
>> At 02:10 PM 3/7/00 +0100, Antonin Novak wrote:
>> >I am looking to present the output from LDAPSEARCH in the same
>> >format, so that I can display the results on a Web page.
>> >I have written the records using a standard output, but if
>> >modifications take place, this format is changed.
>> >Does anyone know if it is possible to sort the data, or do I need to
>> >look outside of LDAP for the solution ?
>> Try the -S option to ldapsearch. man ldapsearch(1) for details.