[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ldapsearch truncates at ~80 columns
It's possible to implement a filter that converts from the output of `ldapsearch`
to valid LDIF that isn't wrapped, or is wrapped to a different line width. I
attach an example, based on PerLDAP.
Villy Kruse wrote:
> Netscape ldapsearch has -T option to disable this behaviour.
>
> On Wed, 1 Sep 1999, De Martin Michele wrote:
>
> > ... ldapsearch truncates its output near the 80 columns boundary.
> >
> > How can I let output be as long as needed (now some long DNs are
> > splitted in 2 lines)?
#!/usr/local/bin/perl
use Mozilla::LDAP::LDIF 0.07 qw(read_file_URL_or_name);
# ftp://ftp.mozilla.org/pub/directory/perldap/
my $in = new Mozilla::LDAP::LDIF (*STDIN, \&read_file_URL_or_name, "comments");
my $out = new Mozilla::LDAP::LDIF (*STDOUT, [max_line=>shift]);
while (($record) = get $in (1)) {
put $out ($record);
}