<?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: Getting the exit status in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711388#M721563</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;There is no direct way to do this since $? only indicates that remsh was able to be launched. To get the remote exit status it more complicated but it can be done. See this thread:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7e2d8ffa98a2d5118ff10090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7e2d8ffa98a2d5118ff10090279cd0f9,00.html&lt;/A&gt;</description>
    <pubDate>Thu, 25 Apr 2002 18:50:11 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2002-04-25T18:50:11Z</dc:date>
    <item>
      <title>Getting the exit status</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711387#M721562</link>
      <description>Hi there,&lt;BR /&gt;  I am trying the following script to read its exit status and depending on that I want to run my program.&lt;BR /&gt;-----------------------------------&lt;BR /&gt;hostname=`hostname`&lt;BR /&gt;BVSTAT=0&lt;BR /&gt;&lt;BR /&gt;ps -eaf|grep bvtst|grep bv|grep -v grep|grep -v ksh &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;        if [[ $? -eq 0 ]]&lt;BR /&gt;             then&lt;BR /&gt;           BVSTAT=1&lt;BR /&gt;         fi&lt;BR /&gt;----------------------------------&lt;BR /&gt;&lt;BR /&gt;I am able to get BVSTAT value when I run on the same host.If I am trying to run the above script remotely means using rsh or pbrun.In that case I am not get the exit status,so I am not getting proper output to my program.&lt;BR /&gt;&lt;BR /&gt;Can anyone help me on this which can give exit status even from remote system.&lt;BR /&gt;&lt;BR /&gt;Secnario:&lt;BR /&gt;&lt;BR /&gt;SystemA and SystemB&lt;BR /&gt;&lt;BR /&gt;When I run on systemA I am getting the value of BVSTAT&lt;BR /&gt;&lt;BR /&gt;When I run on systemB using rsh or pbrun I am not getting the value for BVSTAT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help me.&lt;BR /&gt;&lt;BR /&gt;-Nag</description>
      <pubDate>Thu, 25 Apr 2002 18:37:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711387#M721562</guid>
      <dc:creator>Chandramani</dc:creator>
      <dc:date>2002-04-25T18:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the exit status</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711388#M721563</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;There is no direct way to do this since $? only indicates that remsh was able to be launched. To get the remote exit status it more complicated but it can be done. See this thread:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7e2d8ffa98a2d5118ff10090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7e2d8ffa98a2d5118ff10090279cd0f9,00.html&lt;/A&gt;</description>
      <pubDate>Thu, 25 Apr 2002 18:50:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711388#M721563</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-25T18:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the exit status</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711389#M721564</link>
      <description>Hi Chandramani,&lt;BR /&gt;&lt;BR /&gt;If you are trying to find out that bvstat is running on remote system then&lt;BR /&gt;&lt;BR /&gt;for sys in systemA systemB &lt;BR /&gt;do&lt;BR /&gt;  STAT=`remsh $sys ps -e |grep bvstat|wc -l`&lt;BR /&gt;  if [ $STAT -ge 1 ] ; then&lt;BR /&gt;     echo "it is running"&lt;BR /&gt;  fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
      <pubDate>Thu, 25 Apr 2002 19:12:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711389#M721564</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2002-04-25T19:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the exit status</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711390#M721565</link>
      <description>Try this:&lt;BR /&gt;&lt;BR /&gt;hostname=`hostname` &lt;BR /&gt;BVSTAT=0 &lt;BR /&gt;&lt;BR /&gt;BV_PS=`ps -eaf|grep bvtst|grep bv|grep -v grep|grep -v ksh`&lt;BR /&gt;&lt;BR /&gt;if [[ -n ${BV_PS} ]] &lt;BR /&gt;then &lt;BR /&gt;BVSTAT=1 &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Thu, 25 Apr 2002 19:50:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-the-exit-status/m-p/2711390#M721565</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-04-25T19:50:50Z</dc:date>
    </item>
  </channel>
</rss>

