[Pkg-openldap-devel] Bug#530519: Bug#530519: Bug#530519: /usr/bin/ldapsearch: ldap-utils: ldapsearch always cut output into 76-character length lines

Peter Marschall peter at adpm.de
Sat May 30 14:37:10 UTC 2009


spg <bugreporter at udmvt.ru> writes:
> This does not depend on tty width.
> Also no piece of code checks to see if output is a tty.
> Output example:
> mail:< file:///tmp/ldapsearch-mail-gA0v8v
> msExchHomeServerName:<
> file:///tmp/ldapsearch-msExchHomeServerName-y5RfdB
> msExchMailboxSecurityDescriptor:<
> file:///tmp/ldapsearch-msExchMailboxSecurit yDescriptor-y7G0hG
> msExchUserAccountControl:<
> file:///tmp/ldapsearch-msExchUserAccountControl-K9 yMmL
> msExchMailboxGuid:< file:///tmp/ldapsearch-msExchMailboxGuid-eHEzrQ
> End of example.

You can undo the line-folding, that ldapsearch does, using a simple filter:

	ldapsearch ... | perl -p -0040 -e 's/\n //'

This unfolds all folded lines in ldapsearch's output.

Hope this helps
Peter

-- 
Peter Marschall
peter at adpm.de





More information about the Pkg-openldap-devel mailing list