<?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: Writing into log file - Scripting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619492#M675786</link>
    <description>Hi, Thanks for response.&lt;BR /&gt;&lt;BR /&gt;Below is the error I found with script. Please help in trouble shoot.&lt;BR /&gt;&lt;BR /&gt;$ ./filter.sh ObjectSpawner.log &amp;gt; results.log&lt;BR /&gt;./filter.sh[5]: use:  not found.&lt;BR /&gt;./filter.sh[6]: use:  not found.&lt;BR /&gt;./filter.sh[7]: Syntax error at line 7 : `)' is not expected.&lt;BR /&gt;&lt;BR /&gt;$ perl -v&lt;BR /&gt;&lt;BR /&gt;This is perl, v5.8.8 built for IA64.ARCHREV_0-thread-multi&lt;BR /&gt;&lt;BR /&gt;Copyright 1987-2006, Larry Wall&lt;BR /&gt;&lt;BR /&gt;Perl may be copied only under the terms of either the Artistic License or the&lt;BR /&gt;GNU General Public License, which may be found in the Perl 5 source kit.&lt;BR /&gt;&lt;BR /&gt;Complete documentation for Perl, including FAQ lists, should be found on&lt;BR /&gt;this system using "man perl" or "perldoc perl".  If you have access to the&lt;BR /&gt;Internet, point your browser at &lt;A href="http://www.perl.org/," target="_blank"&gt;http://www.perl.org/,&lt;/A&gt; the Perl Home Page.</description>
    <pubDate>Sun, 18 Apr 2010 08:37:54 GMT</pubDate>
    <dc:creator>Archana1</dc:creator>
    <dc:date>2010-04-18T08:37:54Z</dc:date>
    <item>
      <title>Writing into log file - Scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619490#M675784</link>
      <description>Hello Experts,&lt;BR /&gt;&lt;BR /&gt;Please help me simple scripting -&lt;BR /&gt;&lt;BR /&gt;which captures  ERROR,WARN,FATAL   entries between  6 AM - 6PM  (Monday - Friday) and should put in seperate log file.&lt;BR /&gt;&lt;BR /&gt;Here is my log file :-&lt;BR /&gt;2010-03-30T16:12:42,728 ERROR [00000008] :sassrv - ERROR: Failed to retrieve log&lt;BR /&gt;in credential from the authentication domain.&lt;BR /&gt;2010-03-30T16:12:42,728 ERROR [00000008] :sassrv - ERROR: Failed to retrieve log&lt;BR /&gt;in credential from the authentication domain.&lt;BR /&gt;&lt;BR /&gt;2010-04-15T01:21:54,847       [00000004] sas -    Option (0x5) dnsMatch&lt;BR /&gt;2010-04-15T01:21:54,890       [00000004] sas -       value (0x0) sasseam.uk.capi&lt;BR /&gt;talone.com&lt;BR /&gt;2010-04-15T01:21:54,899       [00000004] sas -    Option (0xe) sasspawnercn</description>
      <pubDate>Sat, 17 Apr 2010 19:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619490#M675784</guid>
      <dc:creator>Archana1</dc:creator>
      <dc:date>2010-04-17T19:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Writing into log file - Scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619491#M675785</link>
      <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;You could use:&lt;BR /&gt;&lt;BR /&gt;# cat ./filter&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;    next unless m{(?:ERROR|WARN|FATAL)};&lt;BR /&gt;    ( my $time ) = (m{^\d{4}.{6}T(\d\d)});&lt;BR /&gt;    print if ( $time &amp;lt;= 18 &amp;amp;&amp;amp; $time &amp;gt;= 6 );&lt;BR /&gt;}&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;...run as:&lt;BR /&gt;&lt;BR /&gt;# ./filter logfilename &amp;gt; results&lt;BR /&gt;&lt;BR /&gt;I presume that your log is a daily one, recreated every day.  In that case, simply 'cron' this script to run sometime after 1800 hours.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 17 Apr 2010 23:06:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619491#M675785</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-04-17T23:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Writing into log file - Scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619492#M675786</link>
      <description>Hi, Thanks for response.&lt;BR /&gt;&lt;BR /&gt;Below is the error I found with script. Please help in trouble shoot.&lt;BR /&gt;&lt;BR /&gt;$ ./filter.sh ObjectSpawner.log &amp;gt; results.log&lt;BR /&gt;./filter.sh[5]: use:  not found.&lt;BR /&gt;./filter.sh[6]: use:  not found.&lt;BR /&gt;./filter.sh[7]: Syntax error at line 7 : `)' is not expected.&lt;BR /&gt;&lt;BR /&gt;$ perl -v&lt;BR /&gt;&lt;BR /&gt;This is perl, v5.8.8 built for IA64.ARCHREV_0-thread-multi&lt;BR /&gt;&lt;BR /&gt;Copyright 1987-2006, Larry Wall&lt;BR /&gt;&lt;BR /&gt;Perl may be copied only under the terms of either the Artistic License or the&lt;BR /&gt;GNU General Public License, which may be found in the Perl 5 source kit.&lt;BR /&gt;&lt;BR /&gt;Complete documentation for Perl, including FAQ lists, should be found on&lt;BR /&gt;this system using "man perl" or "perldoc perl".  If you have access to the&lt;BR /&gt;Internet, point your browser at &lt;A href="http://www.perl.org/," target="_blank"&gt;http://www.perl.org/,&lt;/A&gt; the Perl Home Page.</description>
      <pubDate>Sun, 18 Apr 2010 08:37:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619492#M675786</guid>
      <dc:creator>Archana1</dc:creator>
      <dc:date>2010-04-18T08:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Writing into log file - Scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619493#M675787</link>
      <description>&lt;!--!*#--&gt;&amp;gt; $ ./filter.sh ObjectSpawner.log &amp;gt; results.log&lt;BR /&gt;&amp;gt; ./filter.sh[5]: use: not found.&lt;BR /&gt;&amp;gt; [...]&lt;BR /&gt;&lt;BR /&gt;Apparently, your "filter.sh" script differs&lt;BR /&gt;from the suggested "filter" script, but, with&lt;BR /&gt;my weak psychic powers, I can see only one of&lt;BR /&gt;the two, and it's not yours.&lt;BR /&gt;&lt;BR /&gt;      cat filter.sh</description>
      <pubDate>Sun, 18 Apr 2010 11:40:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619493#M675787</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-04-18T11:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Writing into log file - Scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619494#M675788</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Below is the error I found with script.&lt;BR /&gt;&lt;BR /&gt;You changed the interpreter (she-bang) or dropped it entirely.  The script's first line should read something like:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;...or whatever is the absolute path to your perl executable.&lt;BR /&gt;&lt;BR /&gt;You could also dynamically find perl in your PATH  by using:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/env perl&lt;BR /&gt;&lt;BR /&gt;Note the whitespace before the word 'perl'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 18 Apr 2010 15:06:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/writing-into-log-file-scripting/m-p/4619494#M675788</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-04-18T15:06:07Z</dc:date>
    </item>
  </channel>
</rss>

