<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: join lines together in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/join-lines-together/m-p/3466778#M15992</link>
    <description>perl -e 'while (&amp;lt;&amp;gt;){chop;if (/^ /){print $'}else{print "\n$_"}}print "\n"' tmp.txt&lt;BR /&gt;&lt;BR /&gt;a possibly perl solution. Not too pretty...&lt;BR /&gt;&lt;BR /&gt;- loop over data&lt;BR /&gt;- chop of trailing new-line&lt;BR /&gt;- if starts with a space then print $' = the rest.&lt;BR /&gt;- else print a new-line to finish last line and print this line.&lt;BR /&gt;- at end of loop print final new-line.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 21 Jan 2005 02:00:32 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2005-01-21T02:00:32Z</dc:date>
    <item>
      <title>join lines together</title>
      <link>https://community.hpe.com/t5/operating-system-linux/join-lines-together/m-p/3466776#M15990</link>
      <description>On RH 6.1 with ldapsearch (openldap -1.2.7-2 I extract entries from my ldap database. As some entries are very long, they are splitted in 2 lines. The format of output file Myfile.ldif is like in the attachment: &lt;BR /&gt;&lt;BR /&gt;I recognize splitted lines because they are preceded by a " " so that&lt;BR /&gt;$grep -B1 "^ " Myfile.ldif gives me all couples of lines to join together [Never 3 lines to join!].&lt;BR /&gt;&lt;BR /&gt;At the end I would like to have the same file Myfile.ldif with this problem solved. :))&lt;BR /&gt;&lt;BR /&gt;Thank You in advance!&lt;BR /&gt;Leo.</description>
      <pubDate>Wed, 19 Jan 2005 12:56:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/join-lines-together/m-p/3466776#M15990</guid>
      <dc:creator>leonardo bianchi quota</dc:creator>
      <dc:date>2005-01-19T12:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: join lines together</title>
      <link>https://community.hpe.com/t5/operating-system-linux/join-lines-together/m-p/3466777#M15991</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I played with solving this problem with sed for a while.  I gave up and went to Perl.  I couldn't find an elegant solution so I went back to sed and finally came up with this:&lt;BR /&gt;&lt;BR /&gt;sed -e :a -e '$!N;s/\n / /;ta' -e 'P;D' Myfile.ldif&lt;BR /&gt;&lt;BR /&gt;See if that does what you want.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Jan 2005 17:31:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/join-lines-together/m-p/3466777#M15991</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2005-01-19T17:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: join lines together</title>
      <link>https://community.hpe.com/t5/operating-system-linux/join-lines-together/m-p/3466778#M15992</link>
      <description>perl -e 'while (&amp;lt;&amp;gt;){chop;if (/^ /){print $'}else{print "\n$_"}}print "\n"' tmp.txt&lt;BR /&gt;&lt;BR /&gt;a possibly perl solution. Not too pretty...&lt;BR /&gt;&lt;BR /&gt;- loop over data&lt;BR /&gt;- chop of trailing new-line&lt;BR /&gt;- if starts with a space then print $' = the rest.&lt;BR /&gt;- else print a new-line to finish last line and print this line.&lt;BR /&gt;- at end of loop print final new-line.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Jan 2005 02:00:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/join-lines-together/m-p/3466778#M15992</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-01-21T02:00:32Z</dc:date>
    </item>
  </channel>
</rss>

