<?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 Please make this script work for me in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651461#M46129</link>
    <description>I have posted this several times but this still doesn;t seem to work. Please take a look at this and tell me what am I doing wrong. I'm looking for the start time, end time of my make recovery, put in a table. Then if the make recovery was completed sucessfully, I wonna show the whole row as color green and if it was not sucessful, I need the row to be color red. Any help will be grealty greatly appreciated. I promise not to bother anyone again...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Declare variables&lt;BR /&gt;&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;# Get the start time&lt;BR /&gt;&lt;BR /&gt; ssh $i "tail -2 /var/opt/ignite/logs/makrec.log1 2&amp;gt; /dev/null |   grep -i 'Started'" &amp;gt; $TMP_PAGE2 &lt;BR /&gt;&lt;BR /&gt; echo "&lt;HR width="50%" /&gt;" &amp;gt;&amp;gt; $TMP_PAGE2&lt;BR /&gt;&lt;BR /&gt;# Get the end time - will also use later for COLOR selection&lt;BR /&gt;&lt;BR /&gt; END=$(ssh $i "tail -2 /var/opt/ignite/logs/makrec.log1 2&amp;gt; /dev/null |   grep -i 'Completed'") &lt;BR /&gt;&lt;BR /&gt; echo $END &amp;gt;&amp;gt; $TMP_PAGE2 &lt;BR /&gt;&lt;BR /&gt; echo "&lt;BR /&gt;" &amp;gt;&amp;gt; $TMP_PAGE2&lt;BR /&gt; echo "" &amp;gt;&amp;gt; $TMP_PAGE2&lt;BR /&gt;&lt;BR /&gt;# Get the failure code and set the color&lt;BR /&gt;&lt;BR /&gt;FAIL_CODE=$(ssh $i "tail -2 /var/opt/ignite/logs/makrec.log1 2&amp;gt; /dev/null |       grep -i 'ended unsucessfully' |       tail -1")&lt;BR /&gt;&lt;BR /&gt; case $FAIL_CODE in &lt;BR /&gt;&lt;BR /&gt;  "Completed" )&lt;BR /&gt;   COLOR="GREEN"&lt;BR /&gt;  ;;&lt;BR /&gt;&lt;BR /&gt;  "Ended Unsucessfully" )&lt;BR /&gt;   COLOR="RED"&lt;BR /&gt;  ;;&lt;BR /&gt;&lt;BR /&gt;  * )&lt;BR /&gt;   COLOR="RED"&lt;BR /&gt;  ;;&lt;BR /&gt; esac&lt;BR /&gt;&lt;BR /&gt;# Also set the COLOR based on $END&lt;BR /&gt;&lt;BR /&gt; [ $(echo $END | grep -c completed) -eq 1 ] &amp;amp;&amp;amp; COLOR="GREEN"&lt;BR /&gt;&lt;BR /&gt;# Build the first column - This is where we set the color&lt;BR /&gt;&lt;BR /&gt; echo "" &amp;gt; $TMP_PAGE1&lt;BR /&gt;&lt;BR /&gt;        echo "&lt;FONT size="+1" face="Arial"&gt;" &amp;gt;&amp;gt; $TMP_PAGE1&lt;BR /&gt; echo "$i &lt;/FONT&gt;" &amp;gt;&amp;gt; $TMP_PAGE1&lt;BR /&gt;        echo "&lt;FONT size="-1" face="Arial"&gt;" &amp;gt;&amp;gt; $TMP_PAGE1&lt;BR /&gt; echo "&lt;BR /&gt;" &amp;gt;&amp;gt; $TMP_PAGE1&lt;BR /&gt;&lt;BR /&gt;# Pull it together&lt;BR /&gt;&lt;BR /&gt;cat $TMP_PAGE1 $TMP_PAGE2 &amp;gt;&amp;gt; $PAGE&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;# end the table&lt;BR /&gt;&lt;BR /&gt;echo "" &amp;gt;&amp;gt; $PAGE&lt;BR /&gt;echo "" &amp;gt;&amp;gt; $PAGE&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;</description>
    <pubDate>Wed, 23 Jan 2002 22:38:40 GMT</pubDate>
    <dc:creator>Ragni Singh</dc:creator>
    <dc:date>2002-01-23T22:38:40Z</dc:date>
    <item>
      <title>Please make this script work for me</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651461#M46129</link>
      <description>I have posted this several times but this still doesn;t seem to work. Please take a look at this and tell me what am I doing wrong. I'm looking for the start time, end time of my make recovery, put in a table. Then if the make recovery was completed sucessfully, I wonna show the whole row as color green and if it was not sucessful, I need the row to be color red. Any help will be grealty greatly appreciated. I promise not to bother anyone again...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Declare variables&lt;BR /&gt;&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;# Get the start time&lt;BR /&gt;&lt;BR /&gt; ssh $i "tail -2 /var/opt/ignite/logs/makrec.log1 2&amp;gt; /dev/null |   grep -i 'Started'" &amp;gt; $TMP_PAGE2 &lt;BR /&gt;&lt;BR /&gt; echo "&lt;HR width="50%" /&gt;" &amp;gt;&amp;gt; $TMP_PAGE2&lt;BR /&gt;&lt;BR /&gt;# Get the end time - will also use later for COLOR selection&lt;BR /&gt;&lt;BR /&gt; END=$(ssh $i "tail -2 /var/opt/ignite/logs/makrec.log1 2&amp;gt; /dev/null |   grep -i 'Completed'") &lt;BR /&gt;&lt;BR /&gt; echo $END &amp;gt;&amp;gt; $TMP_PAGE2 &lt;BR /&gt;&lt;BR /&gt; echo "&lt;BR /&gt;" &amp;gt;&amp;gt; $TMP_PAGE2&lt;BR /&gt; echo "" &amp;gt;&amp;gt; $TMP_PAGE2&lt;BR /&gt;&lt;BR /&gt;# Get the failure code and set the color&lt;BR /&gt;&lt;BR /&gt;FAIL_CODE=$(ssh $i "tail -2 /var/opt/ignite/logs/makrec.log1 2&amp;gt; /dev/null |       grep -i 'ended unsucessfully' |       tail -1")&lt;BR /&gt;&lt;BR /&gt; case $FAIL_CODE in &lt;BR /&gt;&lt;BR /&gt;  "Completed" )&lt;BR /&gt;   COLOR="GREEN"&lt;BR /&gt;  ;;&lt;BR /&gt;&lt;BR /&gt;  "Ended Unsucessfully" )&lt;BR /&gt;   COLOR="RED"&lt;BR /&gt;  ;;&lt;BR /&gt;&lt;BR /&gt;  * )&lt;BR /&gt;   COLOR="RED"&lt;BR /&gt;  ;;&lt;BR /&gt; esac&lt;BR /&gt;&lt;BR /&gt;# Also set the COLOR based on $END&lt;BR /&gt;&lt;BR /&gt; [ $(echo $END | grep -c completed) -eq 1 ] &amp;amp;&amp;amp; COLOR="GREEN"&lt;BR /&gt;&lt;BR /&gt;# Build the first column - This is where we set the color&lt;BR /&gt;&lt;BR /&gt; echo "" &amp;gt; $TMP_PAGE1&lt;BR /&gt;&lt;BR /&gt;        echo "&lt;FONT size="+1" face="Arial"&gt;" &amp;gt;&amp;gt; $TMP_PAGE1&lt;BR /&gt; echo "$i &lt;/FONT&gt;" &amp;gt;&amp;gt; $TMP_PAGE1&lt;BR /&gt;        echo "&lt;FONT size="-1" face="Arial"&gt;" &amp;gt;&amp;gt; $TMP_PAGE1&lt;BR /&gt; echo "&lt;BR /&gt;" &amp;gt;&amp;gt; $TMP_PAGE1&lt;BR /&gt;&lt;BR /&gt;# Pull it together&lt;BR /&gt;&lt;BR /&gt;cat $TMP_PAGE1 $TMP_PAGE2 &amp;gt;&amp;gt; $PAGE&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;# end the table&lt;BR /&gt;&lt;BR /&gt;echo "" &amp;gt;&amp;gt; $PAGE&lt;BR /&gt;echo "" &amp;gt;&amp;gt; $PAGE&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;</description>
      <pubDate>Wed, 23 Jan 2002 22:38:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651461#M46129</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2002-01-23T22:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Please make this script work for me</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651462#M46130</link>
      <description>Hi Sanman,&lt;BR /&gt;&lt;BR /&gt;We didn't get any feedback from you in the following post&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x21eac6af36b7d5118ff10090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x21eac6af36b7d5118ff10090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You need to replace remsh with ssh and try my solution. Please let us know.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Wed, 23 Jan 2002 22:43:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651462#M46130</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-01-23T22:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Please make this script work for me</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651463#M46131</link>
      <description>Okay Sri, look slike I made some progress. Now when I run it, I get this error message...&lt;BR /&gt;&lt;BR /&gt; Completed:  not found&lt;BR /&gt;&lt;BR /&gt;Any ideas buddy!!!</description>
      <pubDate>Wed, 23 Jan 2002 23:16:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651463#M46131</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2002-01-23T23:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Please make this script work for me</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651464#M46132</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;In the posting, the first line appears like two lines but it is one line. Did you try making it one?.&lt;BR /&gt;&lt;BR /&gt;Try with ksh -x option. You will know where you are getting this completed: not found error. This may be because you are improperly specifying the case statement.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Wed, 23 Jan 2002 23:36:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651464#M46132</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-01-23T23:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Please make this script work for me</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651465#M46133</link>
      <description>Thanks for all your time. I'll let you know how it works out for me.</description>
      <pubDate>Thu, 24 Jan 2002 13:47:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-make-this-script-work-for-me/m-p/2651465#M46133</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2002-01-24T13:47:31Z</dc:date>
    </item>
  </channel>
</rss>

