<?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 PERL scripting - help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-scripting-help/m-p/3663186#M102579</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please find attached a log file which is my input file.&lt;BR /&gt;&lt;BR /&gt;I need to extract the portion of the log which is for the last 2 hours and parse that to generate the output which looks like this:&lt;BR /&gt;&lt;BR /&gt;Hostname      Error Code         time range&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The error code is the 4th field in the input. It is successful if the code is "000" and failure otherwise.&lt;BR /&gt;&lt;BR /&gt;I just need all the error codes for the last 2 hours for the day in my output. &lt;BR /&gt;&lt;BR /&gt;Hostname should be the name of the server.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help me to write the script using PERL.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Rahul&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 02 Nov 2005 13:29:24 GMT</pubDate>
    <dc:creator>Rahul_13</dc:creator>
    <dc:date>2005-11-02T13:29:24Z</dc:date>
    <item>
      <title>PERL scripting - help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scripting-help/m-p/3663186#M102579</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please find attached a log file which is my input file.&lt;BR /&gt;&lt;BR /&gt;I need to extract the portion of the log which is for the last 2 hours and parse that to generate the output which looks like this:&lt;BR /&gt;&lt;BR /&gt;Hostname      Error Code         time range&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The error code is the 4th field in the input. It is successful if the code is "000" and failure otherwise.&lt;BR /&gt;&lt;BR /&gt;I just need all the error codes for the last 2 hours for the day in my output. &lt;BR /&gt;&lt;BR /&gt;Hostname should be the name of the server.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help me to write the script using PERL.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Rahul&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Nov 2005 13:29:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scripting-help/m-p/3663186#M102579</guid>
      <dc:creator>Rahul_13</dc:creator>
      <dc:date>2005-11-02T13:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: PERL scripting - help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scripting-help/m-p/3663187#M102580</link>
      <description>1) I don't see you hostname.&lt;BR /&gt;&lt;BR /&gt;2) I could certainly write this but I will not when someone is too lazy to even make the attempt.&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Nov 2005 13:41:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scripting-help/m-p/3663187#M102580</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-11-02T13:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: PERL scripting - help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scripting-help/m-p/3663188#M102581</link>
      <description>Hi Rahul:&lt;BR /&gt;&lt;BR /&gt;I'm not sure what your fields really are.  Assuming that the time period begins in the second (zero-relative) character of the second (zero-relative) field, something like this would output non-zero (e.g. "35V") results for hours greater than "9":&lt;BR /&gt;&lt;BR /&gt;perl -lanF";" -e 'print $F[3] if substr($F[1],2,2) &amp;gt; 9 &amp;amp;&amp;amp; $F[3] !~/000/' logfile&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 02 Nov 2005 13:53:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scripting-help/m-p/3663188#M102581</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-02T13:53:48Z</dc:date>
    </item>
  </channel>
</rss>

