Not sure about export, but the -T argument to ldapsearch will output LDIF with no line breaks.

PK wrote:

Ldif output appears to add linebreaks at column 78.

The LDIF syntax apparently allows you to continue a line in the LDIF file by preceeding the continued part(s) with a space. When parsing an LDIF file if you find a line that starts with a space, you concatenate the rest of the line to the previous line.

Is there a way of overriding this 'feature' in ldif output so that lines are unbroken?

I am looking at processing an ldif file in perl, replacing dn's and then re-entering the ldif file. With the line breaks it makes the task a nightmare as presumably the output would have to be linebroken at column 78 again so that the ldif file can be renetered into ldap.
If you are using perl, why not use PerLDAP or Net::LDAP? These have LDIF parsers that understand how to fold continuation lines.

It would be much more straightforward to have printldif output unbroken lines.
What is printldif?


Is there a way of doing this?

Thanks for your help,

Paul


Reply via email to