-
Website
http://www.dannorris.com/ -
Original page
http://www.dannorris.com/2008/09/08/concatenating-lines-in-ldapsearch-results/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
oraclebase
2 comments · 7 points
-
fuadar
1 comment · 1 points
-
TongucY
2 comments · 1 points
-
dougk
4 comments · 1 points
-
Brian Bent
2 comments · 1 points
-
-
Popular Threads
I got this issue with dipassistant boostrap (line breaks) and incorrect changetype attribute
Thanks Dan !
Please excuse my typos, I sent this from my iPhone.
$cnt=0;
while ($line = <>) {
chomp($line);
if ( $line =~ /^authpassword/ ) {
next;
} elsif ( $line =~ /^\S+/) { ### this line is a "normal" or starting line
$results[$cnt++] = $line;
} elsif ( $line =~ /^$/ ) { ### this line is blank
$results[$cnt++] = "";
} elsif ( $line =~ /^\s+(\S.*)/ ) { ### this line is a continuation
$results[$cnt-1] = $results[$cnt-1] . $1;
}
}
for $i (0 .. $cnt) {
print "$results[$i]\n";
}