<?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 script wanted in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-wanted/m-p/4836245#M641727</link>
    <description>&lt;P&gt;&lt;BR /&gt;I have a database log ( db.log ) which the messages will be appended to it , some of the messages is non-useful , so I want to write a script to write all the lines that have the message "warning" to another log ( eg. db.log2 ), and then remove this line in db.log , as below example , can advise what can i do ? Thanks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The log is as below&lt;BR /&gt;===================&lt;BR /&gt;#vi db.log&lt;/P&gt;&lt;P&gt;"&lt;BR /&gt;aaa&lt;BR /&gt;bbb&lt;BR /&gt;ccc&lt;BR /&gt;warning 111&lt;BR /&gt;ddd&lt;BR /&gt;eee&lt;BR /&gt;warning 222&lt;BR /&gt;fff&lt;BR /&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run the script , the desired output is as below&lt;BR /&gt;===============================================&lt;BR /&gt;#vi db.log&lt;BR /&gt;aaa&lt;BR /&gt;bbb&lt;BR /&gt;ccc&lt;BR /&gt;ddd&lt;BR /&gt;eee&lt;BR /&gt;fff&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#vi db.log2&lt;BR /&gt;warning 111&lt;BR /&gt;warning 222&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jul 2011 03:26:03 GMT</pubDate>
    <dc:creator>sistar</dc:creator>
    <dc:date>2011-07-22T03:26:03Z</dc:date>
    <item>
      <title>script wanted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-wanted/m-p/4836245#M641727</link>
      <description>&lt;P&gt;&lt;BR /&gt;I have a database log ( db.log ) which the messages will be appended to it , some of the messages is non-useful , so I want to write a script to write all the lines that have the message "warning" to another log ( eg. db.log2 ), and then remove this line in db.log , as below example , can advise what can i do ? Thanks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The log is as below&lt;BR /&gt;===================&lt;BR /&gt;#vi db.log&lt;/P&gt;&lt;P&gt;"&lt;BR /&gt;aaa&lt;BR /&gt;bbb&lt;BR /&gt;ccc&lt;BR /&gt;warning 111&lt;BR /&gt;ddd&lt;BR /&gt;eee&lt;BR /&gt;warning 222&lt;BR /&gt;fff&lt;BR /&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run the script , the desired output is as below&lt;BR /&gt;===============================================&lt;BR /&gt;#vi db.log&lt;BR /&gt;aaa&lt;BR /&gt;bbb&lt;BR /&gt;ccc&lt;BR /&gt;ddd&lt;BR /&gt;eee&lt;BR /&gt;fff&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#vi db.log2&lt;BR /&gt;warning 111&lt;BR /&gt;warning 222&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2011 03:26:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-wanted/m-p/4836245#M641727</guid>
      <dc:creator>sistar</dc:creator>
      <dc:date>2011-07-22T03:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: script wanted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-wanted/m-p/4836695#M641728</link>
      <description>Do you have to remove them?&lt;BR /&gt;Would it be OK to get 'more' log files?&lt;BR /&gt;&lt;BR /&gt;cp db.log db2.log&lt;BR /&gt;grep 'warning' db2.log &amp;gt; db.error.log&lt;BR /&gt;grep -v 'warning' db2.log &amp;gt; db.info.log</description>
      <pubDate>Fri, 22 Jul 2011 11:05:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-wanted/m-p/4836695#M641728</guid>
      <dc:creator>Johan Guldmyr</dc:creator>
      <dc:date>2011-07-22T11:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: script wanted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-wanted/m-p/4837411#M641729</link>
      <description>&lt;P&gt;This is the wrong category for scripting.&lt;/P&gt;&lt;P&gt;What OS are you running?&amp;nbsp; What command/shells are available?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2011 01:15:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-wanted/m-p/4837411#M641729</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-07-23T01:15:01Z</dc:date>
    </item>
  </channel>
</rss>

