[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldapseaarch goes newline with long lines



Hello Pierangelo, hello Dave,

none of this solutions work. There is NO space at the end of line. There is only
a 0x0A, like in the other lines also.
What distincts the line that should be merge to the lines before is that they
have no : inthere.

Thank you
Andreas Moroder

And now for Pierangelo

fores riesco a spiegarmi meglio in italiano:
dopo il carattere 78 ldapsearch aggiunge un 0x0a, senza però aggiungere uno
spazio. Le righe che sono state divise in questo modo si distinguono per il
fatto che la parte divisa non contiene un :, la prima riga naturalmente si.

Cordiali saluti
Andreas Moroder


Zitat von Dave Horsfall <daveh@ci.com.au>:

> On Mon, 10 Mar 2003, Pierangelo Masarati wrote:
> 
> > Short: no, no.  ldapsearch(1) writes output according to LDIF1 (RFC2849)
> > which, according to note (2) allows folding values at any char; ldapsearch
> > chooses colum 78 as the last one.  You may unfold values by using an
> > appropriate postprocessing of ldapsearch output, e.g. an awk script
> > like
> >
> > /^dn: / {
> >     prev = $0;
> >     while ($1 != "") {
> >         getline;
> >         if (substr($0,1,1) == " ") {
> >             prev = prev substr($0,2,length($0)-1);
> >         } else {
> >             print prev;
> >             prev = $0;
> >         }
> >     }
> >     print "";
> > }
> 
> One line of Perl:
> 
> perl -p -0040 -e 's/\n //'
> 
> -p:	Loop for each line and print
> -0040:	Set input delimiter to 040 i.e. space
> -e:	Command follows - strip newline/space sequence.
> 
> Who says newlines have to terminate records :-)
> 
> -- 
> Dave Horsfall  DTM  VK2KFU  daveh@ci.com.au  Ph: +61 2 9906-7866  Fx:
> 9906-1556
> Corinthian Engineering, Level 1, 401 Pacific Hwy, Artarmon, NSW 2064,
> Australia
> 
> 


-- 
                      Dr. Andreas Moroder
Leiter der Informatikabteilung - Direttore della ripartizione informatica
        Sanitätsbetrieb Brixen - Azienda Sanitaria di Bressanone