<?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 Return codes from remote commands in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872523#M98767</link>
    <description>This should be a simple problem. &lt;BR /&gt;I need to test for the existance of a file on a remote host.  rsh &lt;REMOTEHOST&gt; test -f &lt;FILENAME&gt; does not work because not matter what the result of the test command, rsh completes sucussfully ( ie returns 0 ).&lt;BR /&gt;I'm checking $?.&lt;BR /&gt;Any ideas would be helpful. &lt;BR /&gt;&lt;/FILENAME&gt;&lt;/REMOTEHOST&gt;</description>
    <pubDate>Fri, 29 Sep 2006 15:14:33 GMT</pubDate>
    <dc:creator>Robert S. White</dc:creator>
    <dc:date>2006-09-29T15:14:33Z</dc:date>
    <item>
      <title>Return codes from remote commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872523#M98767</link>
      <description>This should be a simple problem. &lt;BR /&gt;I need to test for the existance of a file on a remote host.  rsh &lt;REMOTEHOST&gt; test -f &lt;FILENAME&gt; does not work because not matter what the result of the test command, rsh completes sucussfully ( ie returns 0 ).&lt;BR /&gt;I'm checking $?.&lt;BR /&gt;Any ideas would be helpful. &lt;BR /&gt;&lt;/FILENAME&gt;&lt;/REMOTEHOST&gt;</description>
      <pubDate>Fri, 29 Sep 2006 15:14:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872523#M98767</guid>
      <dc:creator>Robert S. White</dc:creator>
      <dc:date>2006-09-29T15:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Return codes from remote commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872524#M98768</link>
      <description>Hi Robert:&lt;BR /&gt;&lt;BR /&gt;Write the result of the file test into a *file* that you fetch to retrieve to determine the success or failure.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 29 Sep 2006 15:29:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872524#M98768</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-09-29T15:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Return codes from remote commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872525#M98769</link>
      <description>How about this:&lt;BR /&gt;&lt;BR /&gt;filespec=/path/to/file&lt;BR /&gt;RESULT=`remsh remotehost "ls $filespec" 2&amp;gt;&amp;amp;1`&lt;BR /&gt;if  [ "$RESULT" = "$filespec" ] &lt;BR /&gt;then&lt;BR /&gt;#found the file ... do something&lt;BR /&gt;else&lt;BR /&gt;# nothing found ... do something else&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HTH. Good luck</description>
      <pubDate>Fri, 29 Sep 2006 15:32:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872525#M98769</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2006-09-29T15:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Return codes from remote commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872526#M98770</link>
      <description>Wow that was quick.&lt;BR /&gt;Kofi ARTHIABAH your solution is a gem.&lt;BR /&gt;I was thinking that I would need to do something like what JRF listed, but your solution is the simple one I needed!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Sep 2006 15:52:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/return-codes-from-remote-commands/m-p/3872526#M98770</guid>
      <dc:creator>Robert S. White</dc:creator>
      <dc:date>2006-09-29T15:52:58Z</dc:date>
    </item>
  </channel>
</rss>

