<?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: Catch return code into remote command execution in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150957#M665933</link>
    <description>Thanks Ivan, the old thread have a lot useful info, analyzing that information could see that the trick is in using simple quotation marks instead of double quotation marks, being in the following way:&lt;BR /&gt;#REMOTE_SYS_TRUSTED=`remsh remotehost -l root -n '/usr/lbin/getprdef -r 2&amp;gt;1 &amp;gt; /dev/null;echo $?'`&lt;BR /&gt;&lt;BR /&gt;Then $REMOTE_SYS_TRUSTED have the correct return code of the command "getprdef".&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
    <pubDate>Fri, 16 Jan 2009 13:27:47 GMT</pubDate>
    <dc:creator>Jose Mosquera</dc:creator>
    <dc:date>2009-01-16T13:27:47Z</dc:date>
    <item>
      <title>Catch return code into remote command execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150955#M665931</link>
      <description>I guys,&lt;BR /&gt;&lt;BR /&gt;I have the following reliable way to validate into a script if a system is trusted or not:&lt;BR /&gt;SYS_TRUSTED=`/usr/lbin/getprdef -r 2&amp;gt;1 &amp;gt; /dev/null;echo $?`&lt;BR /&gt;If return code is 0 the system is trusted.&lt;BR /&gt;So, I'm trying to catch this return code against a remote machine using the similar syntax:&lt;BR /&gt;REMOTE_SYS_TRUSTED=`remsh hostname -l root -n "/usr/lbin/getprdef -r;echo $?"`&lt;BR /&gt;The problem here is that always catch zero status, I guess that remsh return code is catched instead of "getprdef" return code.&lt;BR /&gt;Some hint about? &lt;BR /&gt;&lt;BR /&gt;Please omit recomendation about "/tcb" folder validation or "*" in password field of /etc/passwd file.&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Fri, 16 Jan 2009 09:43:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150955#M665931</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2009-01-16T09:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Catch return code into remote command execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150956#M665932</link>
      <description>See this old thread how to capture exit code on rsh - &lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=944722" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=944722&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Fri, 16 Jan 2009 09:56:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150956#M665932</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2009-01-16T09:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Catch return code into remote command execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150957#M665933</link>
      <description>Thanks Ivan, the old thread have a lot useful info, analyzing that information could see that the trick is in using simple quotation marks instead of double quotation marks, being in the following way:&lt;BR /&gt;#REMOTE_SYS_TRUSTED=`remsh remotehost -l root -n '/usr/lbin/getprdef -r 2&amp;gt;1 &amp;gt; /dev/null;echo $?'`&lt;BR /&gt;&lt;BR /&gt;Then $REMOTE_SYS_TRUSTED have the correct return code of the command "getprdef".&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 16 Jan 2009 13:27:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150957#M665933</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2009-01-16T13:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Catch return code into remote command execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150958#M665934</link>
      <description>Above explained, best regards.</description>
      <pubDate>Fri, 16 Jan 2009 13:29:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catch-return-code-into-remote-command-execution/m-p/5150958#M665934</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2009-01-16T13:29:27Z</dc:date>
    </item>
  </channel>
</rss>

