<?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: rsh/sshWeird Behaviour in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rsh-sshweird-behaviour/m-p/3250332#M175256</link>
    <description>Man.. Thanks!&lt;BR /&gt;&lt;BR /&gt;I should have caught this.. the rules of evaluation of UNIX commands...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 16 Apr 2004 08:04:44 GMT</pubDate>
    <dc:creator>Alzhy</dc:creator>
    <dc:date>2004-04-16T08:04:44Z</dc:date>
    <item>
      <title>rsh/sshWeird Behaviour</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rsh-sshweird-behaviour/m-p/3250330#M175254</link>
      <description>One of my users is wondering about this behaviour:&lt;BR /&gt;&lt;BR /&gt;He has the following command that he tries to run via rsh or ssh from another Unix or Windows machine:&lt;BR /&gt;&lt;BR /&gt;rsh  unixsvr "PID=`ps -ef |grep -w SomeApp123|grep -v grep|awk '{print $2}'`;echo 'I will KILL:$PID'"&lt;BR /&gt;&lt;BR /&gt;This command will eventually be what will be tied to a Java/TCL/tk Button. However, it seems the remote execution does not do what it is required to do... In the above example, it only returns "I will KILL:" &lt;BR /&gt;&lt;BR /&gt;Of course, manually executing the command on the UNIX server works!!&lt;BR /&gt;&lt;BR /&gt;I am stumped.  Any ideas? Same behaviour for ssh...</description>
      <pubDate>Fri, 16 Apr 2004 07:50:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rsh-sshweird-behaviour/m-p/3250330#M175254</guid>
      <dc:creator>Alzhy</dc:creator>
      <dc:date>2004-04-16T07:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: rsh/sshWeird Behaviour</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rsh-sshweird-behaviour/m-p/3250331#M175255</link>
      <description>The problem is the following&lt;BR /&gt;&lt;BR /&gt;`ps -ef |grep -w SomeApp123|grep -v grep|awk '{print $2}'`&lt;BR /&gt;&lt;BR /&gt;is executed on local host, not in remote host.&lt;BR /&gt;Before launching rsh command, the shell will run the above commands. If those prints nothing, then empty string is assigned to PID variable. Thus the real process launched will be:&lt;BR /&gt;&lt;BR /&gt;rsh unisxvr "PID=''; echo 'I will KILL:$PID'"&lt;BR /&gt;&lt;BR /&gt;the commands executed in remote host are:&lt;BR /&gt;&lt;BR /&gt;PID=''; echo 'I will KILL:'&lt;BR /&gt;&lt;BR /&gt;I suggest to substitute double quotes for single quotes, but, be aware that you have other inner single quotes.</description>
      <pubDate>Fri, 16 Apr 2004 07:59:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rsh-sshweird-behaviour/m-p/3250331#M175255</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2004-04-16T07:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: rsh/sshWeird Behaviour</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rsh-sshweird-behaviour/m-p/3250332#M175256</link>
      <description>Man.. Thanks!&lt;BR /&gt;&lt;BR /&gt;I should have caught this.. the rules of evaluation of UNIX commands...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Apr 2004 08:04:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rsh-sshweird-behaviour/m-p/3250332#M175256</guid>
      <dc:creator>Alzhy</dc:creator>
      <dc:date>2004-04-16T08:04:44Z</dc:date>
    </item>
  </channel>
</rss>

