<?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: Return code for remote shell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986751#M123465</link>
    <description>The return code for remsh is working correctly: it returns 0 if the remsh command can connect to the remote system and send the rest of the command line to the remote system. There is only one return code to indicate remsh's success, not the command(s) sent to the remote system. remsh will return a non-zero value if the HOSTNAME is not valid or refuses to allow a login. Command results must be returned through a separator mechanism as mentioned in the above comments.</description>
    <pubDate>Mon, 02 Jun 2003 20:18:07 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2003-06-02T20:18:07Z</dc:date>
    <item>
      <title>Return code for remote shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986747#M123461</link>
      <description>Any idea how to get the exit status/return code for any remote shell command? Always get 0 exit status even if it fails.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 02 Jun 2003 18:47:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986747#M123461</guid>
      <dc:creator>Ila Nigam</dc:creator>
      <dc:date>2003-06-02T18:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Return code for remote shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986748#M123462</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You can (should) write the return code of the process you want to interrogate (after the fact) into a file, and then examine that file for the value the process returned.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 02 Jun 2003 18:52:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986748#M123462</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-06-02T18:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Return code for remote shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986749#M123463</link>
      <description>This thread pretty much covers all the bases.&lt;BR /&gt;&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;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Jun 2003 18:52:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986749#M123463</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-02T18:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Return code for remote shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986750#M123464</link>
      <description>Best deal of all: stop using remote shell altogether.  Use secure shell instead.  Secure shell will return the exit status of whatever it ran on the remote host:&lt;BR /&gt;# ssh REMHOST "uname -n"&lt;BR /&gt;# REMHOST&lt;BR /&gt;# echo "$?"&lt;BR /&gt;# 0&lt;BR /&gt;# ssh REMHOST "uname -b"&lt;BR /&gt;uname: illegal option -- b&lt;BR /&gt;usage: uname [-amnrsvil] [-S nodename]&lt;BR /&gt;# echo "$?"&lt;BR /&gt;1&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;You can get secure shell from softward.hp.com or a lot of other places.  Attached is the document I seem to be posting at least once day that describes how to install it and use it so that you won't be challenged for passwords.</description>
      <pubDate>Mon, 02 Jun 2003 19:29:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986750#M123464</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2003-06-02T19:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Return code for remote shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986751#M123465</link>
      <description>The return code for remsh is working correctly: it returns 0 if the remsh command can connect to the remote system and send the rest of the command line to the remote system. There is only one return code to indicate remsh's success, not the command(s) sent to the remote system. remsh will return a non-zero value if the HOSTNAME is not valid or refuses to allow a login. Command results must be returned through a separator mechanism as mentioned in the above comments.</description>
      <pubDate>Mon, 02 Jun 2003 20:18:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986751#M123465</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-06-02T20:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Return code for remote shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986752#M123466</link>
      <description>You could also do something like:&lt;BR /&gt;&lt;BR /&gt;REMSTAT=`remsh remhost 'cmd 1&amp;gt; /dev/null 2&amp;gt;&amp;amp;1 ;&lt;BR /&gt;if [ $? -eq 1 ]; then&lt;BR /&gt;   echo 1&lt;BR /&gt;else&lt;BR /&gt;   echo 0&lt;BR /&gt;fi'`&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Mon, 02 Jun 2003 21:59:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/return-code-for-remote-shell/m-p/2986752#M123466</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2003-06-02T21:59:46Z</dc:date>
    </item>
  </channel>
</rss>

