Q&A: Can I Sort My Output of univention-ldapsearch?

Question

Can I sort my output of univention-ldapsearch?

Answer

Yes, simply pipe the output of your command to sort by using “|” with the sort command. For example:

univention-ldapsearch -b ou=people,dc=multi,dc=ucs 'memberOf=cn=exgroup,ou=groups,dc=multi,dc=ucs' mailPrimaryAddress | sort
Mastodon