<?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: Cut empty lines in a file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654556#M722883</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Just pull some strings :-) Simply pipe your command through strings ie.&lt;BR /&gt;&lt;BR /&gt;# sar -u 1 10 | awk '{print $2,$3,$4,$5}' | grep -v % | grep -v 9000 | strings&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
    <pubDate>Tue, 29 Jan 2002 12:28:40 GMT</pubDate>
    <dc:creator>Steven Sim Kok Leong</dc:creator>
    <dc:date>2002-01-29T12:28:40Z</dc:date>
    <item>
      <title>Cut empty lines in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654552#M722879</link>
      <description>Hi, I would like cut all empty lines which are in a file. My file was obtain whith this command : &lt;BR /&gt; sar -u 1 10 |awk '{print $2,$3,$4,$5}' |grep -v % |grep -v 9000&lt;BR /&gt;&lt;BR /&gt;which returns me &lt;BR /&gt;&lt;BR /&gt;root@merone:/home/root&amp;gt; sar -u 1 10 |awk '{print $2,$3,$4,$5}' |grep -v % |grep -v 9000&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1 0 0 99&lt;BR /&gt;0 0 0 100&lt;BR /&gt;0 0 1 99&lt;BR /&gt;1 0 4 95&lt;BR /&gt;0 0 0 100&lt;BR /&gt;0 0 0 100&lt;BR /&gt;0 0 0 100&lt;BR /&gt;0 0 0 100&lt;BR /&gt;0 0 0 100&lt;BR /&gt;0 0 0 100&lt;BR /&gt;&lt;BR /&gt;0 0 0 99&lt;BR /&gt;root@merone:/home/root&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I would like cut the empty lines, to add the other line in a another file.&lt;BR /&gt;&lt;BR /&gt;Thanks to help me, i'm not a developper ! ! !</description>
      <pubDate>Tue, 29 Jan 2002 09:27:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654552#M722879</guid>
      <dc:creator>FOREST Michel</dc:creator>
      <dc:date>2002-01-29T09:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cut empty lines in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654553#M722880</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If you just want to get rid of the empty lines, add another grep:&lt;BR /&gt;&lt;BR /&gt;sar -u 1 10 |awk '{print $2,$3,$4,$5}' |grep -v % |grep -v 9000 | grep -v "^ *$"&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;sar -u 1 10 |awk '{print $2,$3,$4,$5}' |grep -v -e % -e 9000 -e "^ *$"&lt;BR /&gt;&lt;BR /&gt;Hope this is what you mean.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin</description>
      <pubDate>Tue, 29 Jan 2002 09:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654553#M722880</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-01-29T09:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cut empty lines in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654554#M722881</link>
      <description>Hi Michel,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;sar -u 1 10 |awk '{print $2,$3,$4,$5}' |grep -v % |grep -v 9000 &amp;gt; popo&lt;BR /&gt;echo "/^$\n1,.-1 w tt1\n.+1,$ w tt2" | ed popo &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Tue, 29 Jan 2002 11:19:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654554#M722881</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-01-29T11:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cut empty lines in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654555#M722882</link>
      <description>or:&lt;BR /&gt;&lt;BR /&gt;sar -u 1 10 |awk '{if ($2 -ge 0) print $2,$3,$4,$5}' &amp;gt; yourfile&lt;BR /&gt;&lt;BR /&gt;Ruediger&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jan 2002 11:48:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654555#M722882</guid>
      <dc:creator>Ruediger Noack</dc:creator>
      <dc:date>2002-01-29T11:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cut empty lines in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654556#M722883</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Just pull some strings :-) Simply pipe your command through strings ie.&lt;BR /&gt;&lt;BR /&gt;# sar -u 1 10 | awk '{print $2,$3,$4,$5}' | grep -v % | grep -v 9000 | strings&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Tue, 29 Jan 2002 12:28:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654556#M722883</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-01-29T12:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cut empty lines in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654557#M722884</link>
      <description>Thanks to all, for all ! ! ! !&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jan 2002 12:46:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654557#M722884</guid>
      <dc:creator>FOREST Michel</dc:creator>
      <dc:date>2002-01-29T12:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cut empty lines in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654558#M722885</link>
      <description>You many want to update your regular expression that matches "blank lines".&lt;BR /&gt;&lt;BR /&gt;     ^&amp;amp;     matches a new-line&lt;BR /&gt;     ^ *&amp;amp;   matches a line with zero&lt;BR /&gt;            or more spaces&lt;BR /&gt;&lt;BR /&gt;What else can be "white space"?  For instance,&lt;BR /&gt;what about a line with a tab or two?  You might&lt;BR /&gt;want to upgrade to an extended regular&lt;BR /&gt;expression that easily covers more "blank&lt;BR /&gt;lines":&lt;BR /&gt;&lt;BR /&gt;     ^[[:space:]]*&amp;amp;&lt;BR /&gt;&lt;BR /&gt;-dlt-&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jan 2002 18:20:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654558#M722885</guid>
      <dc:creator>David Totsch</dc:creator>
      <dc:date>2002-01-29T18:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cut empty lines in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654559#M722886</link>
      <description>And yet another (albeit esoteric) technique:&lt;BR /&gt;&lt;BR /&gt;cat file | /usr/bin/ssp | /usr/bin/rmnl&lt;BR /&gt;&lt;BR /&gt;to remove all blank lines.  Works well.</description>
      <pubDate>Wed, 30 Jan 2002 03:47:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-empty-lines-in-a-file/m-p/2654559#M722886</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-01-30T03:47:05Z</dc:date>
    </item>
  </channel>
</rss>

