<?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 Sed problem....want to remove lines in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928005#M719919</link>
    <description>I am using the following sed statement&lt;BR /&gt;&lt;BR /&gt;sed -e :a -e 's/&amp;lt;[^&amp;gt;]*&amp;gt;//g;/&lt;BR /&gt;When it finds and instance, its leaving a blank space in its place.  &lt;BR /&gt;Most of the time, this is something on one line.  Is there a way I can make the sed statement delete the line after the character match is removed instead of leaving a blank line?  I am trying to clean-up the formatting.  Thanks</description>
    <pubDate>Fri, 14 Mar 2003 20:49:07 GMT</pubDate>
    <dc:creator>Kathleen</dc:creator>
    <dc:date>2003-03-14T20:49:07Z</dc:date>
    <item>
      <title>Sed problem....want to remove lines</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928005#M719919</link>
      <description>I am using the following sed statement&lt;BR /&gt;&lt;BR /&gt;sed -e :a -e 's/&amp;lt;[^&amp;gt;]*&amp;gt;//g;/&lt;BR /&gt;When it finds and instance, its leaving a blank space in its place.  &lt;BR /&gt;Most of the time, this is something on one line.  Is there a way I can make the sed statement delete the line after the character match is removed instead of leaving a blank line?  I am trying to clean-up the formatting.  Thanks</description>
      <pubDate>Fri, 14 Mar 2003 20:49:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928005#M719919</guid>
      <dc:creator>Kathleen</dc:creator>
      <dc:date>2003-03-14T20:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sed problem....want to remove lines</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928006#M719920</link>
      <description>This will remove blank lines:&lt;BR /&gt;&lt;BR /&gt;grep -v "^$" file1 &amp;gt; file2&lt;BR /&gt;cp file2 file1</description>
      <pubDate>Sat, 15 Mar 2003 09:05:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928006#M719920</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2003-03-15T09:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sed problem....want to remove lines</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928007#M719921</link>
      <description>you can add a &lt;BR /&gt;-e '/^$/d'&lt;BR /&gt;&lt;BR /&gt;which will delete all blank lines from the file.&lt;BR /&gt;&lt;BR /&gt;or (not so easy from the command line):&lt;BR /&gt;/instance pattern/ {&lt;BR /&gt;s/this/that/   &lt;BR /&gt;n&lt;BR /&gt;d}&lt;BR /&gt;this makes a substitution,&lt;BR /&gt;n writes your change to stdout and reads the next line into the pattern buffer, d deletes that line (whatever it is)&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;n&lt;BR /&gt;/^$/d} to just delete the next line if it blank.</description>
      <pubDate>Sat, 15 Mar 2003 16:02:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928007#M719921</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2003-03-15T16:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sed problem....want to remove lines</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928008#M719922</link>
      <description>To get rid of the blank space JUST for this substitution without affecting the rest of the rest of the existing blank lines you can do this .. (a little modification to Curt's suggestion) ..&lt;BR /&gt;&lt;BR /&gt;sed -e :a -e 's/&amp;lt;[^&amp;gt;]*&amp;gt;/=/g;/&lt;BR /&gt;Basically replace it with "=" and then delete that line later. That way you still retain the blank lines which are not part of this substitution. This may not be as elegant but it works.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 15 Mar 2003 18:52:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-problem-want-to-remove-lines/m-p/2928008#M719922</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-03-15T18:52:15Z</dc:date>
    </item>
  </channel>
</rss>

