<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: How do I find the exit status of a remote command executed via ssh?</title> <atom:link href="http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Leonel</title><link>http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-171401</link> <dc:creator>Leonel</dc:creator> <pubDate>Thu, 19 May 2011 07:35:44 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-171401</guid> <description>Additional note:
After trying this one. i found out that if ssh cannot resolve the host, the exit status is 255.</description> <content:encoded><![CDATA[<p>Additional note:<br
/> After trying this one. i found out that if ssh cannot resolve the host, the exit status is 255.</p> ]]></content:encoded> </item> <item><title>By: Olivier</title><link>http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-168693</link> <dc:creator>Olivier</dc:creator> <pubDate>Thu, 10 Feb 2011 21:11:04 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-168693</guid> <description>There is an error in the article.
You have to wrap the command in quotes like this :
$ ssh user@ras.nixcraft.in &#039;today ; echo $?&#039;</description> <content:encoded><![CDATA[<p>There is an error in the article.<br
/> You have to wrap the command in quotes like this :<br
/> $ ssh <a
href="mailto:user@ras.nixcraft.in">user@ras.nixcraft.in</a> &#8216;today ; echo $?&#8217;</p> ]]></content:encoded> </item> <item><title>By: vishal</title><link>http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-145738</link> <dc:creator>vishal</dc:creator> <pubDate>Thu, 27 Nov 2008 15:13:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-145738</guid> <description>I am using remsh to execute remote command.
How to obtain exit status of remotely executed command .In remote program i am using exit(number) to differinciate b/w exit status.But all time i get exit status as 0.
Even if i use abort() the exit status is 0.
SOme one help???????????/</description> <content:encoded><![CDATA[<p>I am using remsh to execute remote command.<br
/> How to obtain exit status of remotely executed command .In remote program i am using exit(number) to differinciate b/w exit status.But all time i get exit status as 0.<br
/> Even if i use abort() the exit status is 0.<br
/> SOme one help???????????/</p> ]]></content:encoded> </item> <item><title>By: Greg Wells</title><link>http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-145365</link> <dc:creator>Greg Wells</dc:creator> <pubDate>Fri, 24 Oct 2008 19:33:06 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-145365</guid> <description>You can use conditional control operators if you omit the echo $? command.  The conditional operator evaluates the exit status from the echo $? command which should always be 0.
This version should work:
$ ssh root@192.168.1.16 today &#124;&#124; echo &quot;Command failed&quot;</description> <content:encoded><![CDATA[<p>You can use conditional control operators if you omit the echo $? command.  The conditional operator evaluates the exit status from the echo $? command which should always be 0.</p><p>This version should work:</p><p>$ ssh <a
href="mailto:root@192.168.1.16">root@192.168.1.16</a> today || echo &#8220;Command failed&#8221;</p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-143253</link> <dc:creator>vivek</dc:creator> <pubDate>Sun, 23 Mar 2008 09:53:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-143253</guid> <description>Use ps and jobs commands</description> <content:encoded><![CDATA[<p>Use ps and jobs commands</p> ]]></content:encoded> </item> <item><title>By: Jafar</title><link>http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-143252</link> <dc:creator>Jafar</dc:creator> <pubDate>Sun, 23 Mar 2008 08:56:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/how-do-i-find-the-exit-status-of-a-remote-command-executed-via-ssh.html#comment-143252</guid> <description>Suppose I put a job to run on remote server (in the background and logged. How can I check later whether the job is done or not.
Suppose if i know the Job ID ??</description> <content:encoded><![CDATA[<p>Suppose I put a job to run on remote server (in the background and logged. How can I check later whether the job is done or not.<br
/> Suppose if i know the Job ID ??</p> ]]></content:encoded> </item> </channel> </rss>
