<?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: Help reqd for scripting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5828801#M638693</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dennis ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried the above script , but was not able to grep RC code 12 from the below lines;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** Start of shutcons at Wed Oct 10 00:30:17 IST 2012&lt;/P&gt;&lt;P&gt;*** End of shutcons at Wed Oct 10 00:30:18 IST 2012 - RC = 0&lt;/P&gt;&lt;P&gt;*** End of SY0331 at Wed Oct 10 01:23:17 IST 2012 - RC = 0&lt;BR /&gt;*** Start of BR2490 at Wed Oct 10 01:23:23 IST 2012&lt;BR /&gt;*** End of BR2490 at Wed Oct 10 01:23:36 IST 2012 - RC = 0&lt;BR /&gt;*** Start of cfps0201 at Wed Oct 10 01:23:38 IST 2012&lt;/P&gt;&lt;P&gt;*** End of cfps0201 at Wed Oct 10 01:23:38 IST 2012 - RC = 0&lt;BR /&gt;*** Start of SY0201 at Wed Oct 10 01:23:39 IST 2012&lt;BR /&gt;&lt;STRONG&gt;*** End of SY0201 at Wed Oct 10 01:23:39 IST 2012 - RC = 12&lt;/STRONG&gt;&lt;BR /&gt;*** Start of IN0787 at Wed Oct 10 01:23:40 IST 2012&lt;BR /&gt;*** End of IN0787 at Wed Oct 10 01:23:40 IST 2012 - RC = 0&lt;BR /&gt;*** Start of CI0251 at Wed Oct 10 01:23:43 IST 2012&lt;BR /&gt;*** End of CI0251 at Wed Oct 10 01:23:52 IST 2012 - RC = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Oct 2012 08:07:20 GMT</pubDate>
    <dc:creator>zxcv</dc:creator>
    <dc:date>2012-10-10T08:07:20Z</dc:date>
    <item>
      <title>scripting help reqd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815067#M638681</link>
      <description>&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need a help in getting a formated o/p ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** Start of IN635N1 at Tue Sep 25 23:12:19 IST 2012&lt;BR /&gt;*** End of IN635N1 at Tue Sep 25 23:12:20 IST 2012 - RC = 0&lt;BR /&gt;*** Start of IN9701 at Tue Sep 25 23:12:24 IST 2012&lt;BR /&gt;*** End of IN9701 at Tue Sep 25 23:12:26 IST 2012 - RC = 0&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I need to grep RC codes from the above file and it must mail me immediately&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 09:51:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815067#M638681</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-09-26T09:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help reqd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815263#M638682</link>
      <description>&lt;PRE&gt;#!/bin/sh
SOURCEFILE=/some/file
DESTINATION=zxcv@company.example
SUBJECT="Your RC report"

(printf "%8s %s\n" "Job" "RC"; \&lt;BR /&gt;    echo "------------"; \
    grep -- "- RC =" &amp;lt;"$SOURCEFILE" \
    | awk '{printf "%8s %s\n",$4,$15}') \&lt;BR /&gt;| mailx -s "$SUBJECT" "$DESTINATION"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You specified you want formatted output, but you did not specify the format of the result you wanted.&lt;/P&gt;&lt;P&gt;The above script will produce a mail that will look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;To: zxcv@company.example
Subject: Your RC report

     Job RC
------------
 IN635N1 0
  IN9701 0&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If this is not what you wanted, please specify the output format you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 12:10:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815263#M638682</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2012-09-26T12:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help reqd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815375#M638683</link>
      <description>&lt;P&gt;Hi Matti ,&lt;/P&gt;&lt;P&gt;My o/p file attched herewith.&lt;/P&gt;&lt;P&gt;I want o/p as ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It muxt mail List of job name only other than RC = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For ex: &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF9591A RC= number ( other than zero )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 13:12:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815375#M638683</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-09-26T13:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help reqd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815383#M638684</link>
      <description>&lt;P&gt;PFA o/p file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 13:14:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815383#M638684</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-09-26T13:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help reqd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815387#M638685</link>
      <description>&lt;P&gt;Hi Matti ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its an online file which gets generated daily from 9pm to 9 am.&lt;/P&gt;&lt;P&gt;How can we grep other than RC = 0 from it and mail it immediately.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 13:16:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815387#M638685</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-09-26T13:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815681#M638686</link>
      <description>&lt;P&gt;&amp;gt;How can we grep other than RC = 0 from it and mail it immediately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could do something like:&lt;/P&gt;&lt;P&gt;awk '&lt;/P&gt;&lt;P&gt;BEGIN { start="No previous Start line" }&lt;/P&gt;&lt;P&gt;/Start of/ {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; start = $0 # save&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;/End of/ {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if ($NF != 0) {&amp;nbsp; # if RC != 0, print start and stop lines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print start&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print $0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;}' file-name &amp;gt; failures.log&lt;/P&gt;&lt;P&gt;if [ -s failures.log ]; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; mailx -s "subject" zxcv@company.example &amp;lt; failures.log&lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;rm -f failures.log&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 17:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5815681#M638686</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-09-26T17:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5823057#M638687</link>
      <description>&lt;P&gt;Hi Dennis ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The o/p is fine.&lt;/P&gt;&lt;P&gt;But say that file gets generated form 9 pm .&lt;/P&gt;&lt;P&gt;I need to put this script in cron right ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It must be run when the input file is getting generated.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2012 11:51:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5823057#M638687</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-10-03T11:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5823517#M638688</link>
      <description>&lt;P&gt;&amp;gt;I need to put this script in cron right?&amp;nbsp;&amp;nbsp; It must be run when the input file is getting generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you could put it in a crontab.&amp;nbsp; This would mean you don't have to change how the logfile is generated.&lt;/P&gt;&lt;P&gt;Or you could add to the current script to scan and mail it after the file is finished.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2012 19:49:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5823517#M638688</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-10-03T19:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5824011#M638689</link>
      <description>&lt;P&gt;Hi Dennis ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One small query , what if i want to grep after this line ;&lt;/P&gt;&lt;P&gt;*** Start of shutcons at Fri Sep 21 21:27:43 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and before this line whatevr comes in between.&lt;BR /&gt;*** End of CI0251 at Sat Sep 22 03:37:00 IST 2012 - RC = 0&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2012 09:44:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5824011#M638689</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-10-04T09:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5824427#M638690</link>
      <description>&lt;P&gt;&amp;gt;what if I want to grep after this line&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this a separate requirement or did you want both at the same time?&lt;/P&gt;&lt;P&gt;If only between those two lines:&lt;/P&gt;&lt;P&gt;awk&amp;nbsp; '&lt;BR /&gt;/Start of shutcons at Fri Sep 21 21:27:43 IST 2012/, \&lt;BR /&gt;/End of CI0251 at Sat Sep 22 03:37:00 IST 2012/ {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; print&lt;BR /&gt;} ' file-name&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is that simple, you could also use sed.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2012 22:06:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5824427#M638690</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-10-04T22:06:31Z</dc:date>
    </item>
    <item>
      <title>Help reqd for scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5827547#M638691</link>
      <description>&lt;P&gt;Hi Dennis ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;My reqmnt is as follows;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a logfile gets generated at 9 pm say abc.log which contains a line ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Start of shutcons&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to capture RC codes for all jobs afetr this line &amp;nbsp;, and it must fire a mail grepping RC other than zero codes , till i get a line given below in my dynamically generating log file &amp;nbsp;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;End of CI0251&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample of abc.log file is afollows ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Start of shutcons at&amp;nbsp; Tue Sep 25 21:28:40 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of shutcons at&amp;nbsp; Tue Sep 25 21:28:40 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SY9600&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:29:05 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SY9600&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:29:05 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of shutcons at&amp;nbsp; Tue Sep 25 21:29:06 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of shutcons at&amp;nbsp; Tue Sep 25 21:29:06 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of hksh0004 at&amp;nbsp; Tue Sep 25 21:29:12 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of hksh0004 at&amp;nbsp; Tue Sep 25 21:29:12 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of shutbtm at&amp;nbsp; Tue Sep 25 21:29:19 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of shutbtm at&amp;nbsp; Tue Sep 25 21:29:19 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of stopgateway at&amp;nbsp; Tue Sep 25 21:29:37 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of stopgateway at&amp;nbsp; Tue Sep 25 21:29:38 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of shutbtm at&amp;nbsp; Tue Sep 25 21:29:40 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of shutbtm at&amp;nbsp; Tue Sep 25 21:29:40 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; UTDEBUG1&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:29:41 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; UTDEBUG1&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:29:41 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of hkcheckdf at&amp;nbsp; Tue Sep 25 21:29:43 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of hkcheckdf at&amp;nbsp; Tue Sep 25 21:29:43 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of chkrerun at&amp;nbsp; Tue Sep 25 21:29:47 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of chkrerun at&amp;nbsp; Tue Sep 25 21:29:47 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SY0007&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:29:53 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SY0007&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:29:54 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SY3100&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:30:12 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SY3100&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:30:12 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SP0100&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:30:13 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SP0100&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:30:35 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of spms0122 at&amp;nbsp; Tue Sep 25 21:30:36 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of spms0122 at&amp;nbsp; Tue Sep 25 21:31:07 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SY9507&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:08 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SY9507&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:11 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of stopgateway at&amp;nbsp; Tue Sep 25 21:31:16 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of stopgateway at&amp;nbsp; Tue Sep 25 21:31:16 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of shutbtm at&amp;nbsp; Tue Sep 25 21:31:17 IST 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of shutbtm at&amp;nbsp; Tue Sep 25 21:31:17 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SY9600&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:18 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SY9600&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:18 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; UTDEBUG1&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:19 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; UTDEBUG1&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:19 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SY0007&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:27 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SY0007&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:27 IST 2012&amp;nbsp; - RC = &amp;nbsp;04&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SY3300&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:47 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SY3300&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:47 IST 2012&amp;nbsp; - RC =&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;*** Start of&amp;nbsp; SY0199&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:56 IST 2012&lt;/P&gt;&lt;P&gt;*** End&amp;nbsp;&amp;nbsp; of&amp;nbsp; SY0199&amp;nbsp; at&amp;nbsp; Tue Sep 25 21:31:56 IST 2012&amp;nbsp; - RC = &amp;nbsp;254&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;End of CI0251&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It must fire a mail saying job sy0199 RC = 254&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;It must fire a mail saying job sy0007 RC = 04 immediately as it comes in abc.log file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 07:52:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5827547#M638691</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-10-09T07:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help reqd for scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5828573#M638692</link>
      <description>&lt;P&gt;awk&amp;nbsp; '&lt;BR /&gt;/Start of shutcons/, /End of CI0251/ {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if ($2 == "End" &amp;amp;&amp;amp; $3 == "of" &amp;amp;&amp;amp; $NF != 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # if RC != 0, print stop line&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "job", $4, $(NF-2), "=", $NF&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;} ' abc.log &amp;gt; failures.log&lt;/P&gt;&lt;P&gt;if [ -s failures.log ]; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; mailx -s "subject" zxcv@company.example &amp;lt; failures.log&lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;rm -f failures.log&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 17:17:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5828573#M638692</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-10-10T17:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help reqd for scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5828801#M638693</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dennis ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried the above script , but was not able to grep RC code 12 from the below lines;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** Start of shutcons at Wed Oct 10 00:30:17 IST 2012&lt;/P&gt;&lt;P&gt;*** End of shutcons at Wed Oct 10 00:30:18 IST 2012 - RC = 0&lt;/P&gt;&lt;P&gt;*** End of SY0331 at Wed Oct 10 01:23:17 IST 2012 - RC = 0&lt;BR /&gt;*** Start of BR2490 at Wed Oct 10 01:23:23 IST 2012&lt;BR /&gt;*** End of BR2490 at Wed Oct 10 01:23:36 IST 2012 - RC = 0&lt;BR /&gt;*** Start of cfps0201 at Wed Oct 10 01:23:38 IST 2012&lt;/P&gt;&lt;P&gt;*** End of cfps0201 at Wed Oct 10 01:23:38 IST 2012 - RC = 0&lt;BR /&gt;*** Start of SY0201 at Wed Oct 10 01:23:39 IST 2012&lt;BR /&gt;&lt;STRONG&gt;*** End of SY0201 at Wed Oct 10 01:23:39 IST 2012 - RC = 12&lt;/STRONG&gt;&lt;BR /&gt;*** Start of IN0787 at Wed Oct 10 01:23:40 IST 2012&lt;BR /&gt;*** End of IN0787 at Wed Oct 10 01:23:40 IST 2012 - RC = 0&lt;BR /&gt;*** Start of CI0251 at Wed Oct 10 01:23:43 IST 2012&lt;BR /&gt;*** End of CI0251 at Wed Oct 10 01:23:52 IST 2012 - RC = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 08:07:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5828801#M638693</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-10-10T08:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help reqd for scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5829385#M638694</link>
      <description>&lt;P&gt;&amp;gt;I tried the above script , but was not able to grep RC code 12 from the below lines;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** Start of shutcons at Wed Oct 10 00:30:17 IST 2012&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;*** End of CI0251 at Wed Oct 10 01:23:52 IST 2012 - RC = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From your example file, I assumed that the start and ending strings didn't have leading "***".&amp;nbsp; So change to:&lt;/P&gt;&lt;P&gt;/Start of shutcons/, /End of CI0251/ {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 17:18:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5829385#M638694</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-10-10T17:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help reqd for scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5830325#M638695</link>
      <description>&lt;P&gt;Hi Dennis ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2012 12:00:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help-reqd/m-p/5830325#M638695</guid>
      <dc:creator>zxcv</dc:creator>
      <dc:date>2012-10-11T12:00:51Z</dc:date>
    </item>
  </channel>
</rss>

