<?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: how to call shell script from another node? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401001#M61342</link>
    <description>Oh sry, noticed that my test string isn't gonna work.&lt;BR /&gt;&lt;BR /&gt;It'll just echo the $PATH on your local machine.&lt;BR /&gt;Might be able to do this with a eval or something else.&lt;BR /&gt;&lt;BR /&gt;Don't give me any points for this post&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
    <pubDate>Wed, 15 Apr 2009 09:28:00 GMT</pubDate>
    <dc:creator>Fredrik.eriksson</dc:creator>
    <dc:date>2009-04-15T09:28:00Z</dc:date>
    <item>
      <title>how to call shell script from another node?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4400998#M61339</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i configuared ssh for server(rac1,rac2). i have created one script in rac1 node. i am getting following error when calling script&lt;BR /&gt;&lt;BR /&gt;in RAC1:&lt;BR /&gt;rac1-~&amp;gt; one.sh&lt;BR /&gt;echo "Welcome"&lt;BR /&gt;&lt;BR /&gt;in RAC2:&lt;BR /&gt;&lt;BR /&gt;rac2-~&amp;gt;cat two.sh&lt;BR /&gt;ssh rac1 one.sh&lt;BR /&gt;echo "Welcome to ALL"&lt;BR /&gt;&lt;BR /&gt;rac2-~&amp;gt;sh two.sh&lt;BR /&gt;sh:command not found&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Wed, 15 Apr 2009 05:25:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4400998#M61339</guid>
      <dc:creator>friend_1</dc:creator>
      <dc:date>2009-04-15T05:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to call shell script from another node?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4400999#M61340</link>
      <description>try doing it like this instead. Since you're not logging in via a proper shell when trying to execute a command with ssh you don't get the $PATH set either I believe.&lt;BR /&gt;You can test this by doing this:&lt;BR /&gt;ssh rac2 "echo $PATH"&lt;BR /&gt;&lt;BR /&gt;My solution to your problem is something like this:&lt;BR /&gt;ssh rac2 "/bin/sh /path/to/one.sh"&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
      <pubDate>Wed, 15 Apr 2009 06:47:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4400999#M61340</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-04-15T06:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to call shell script from another node?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401000#M61341</link>
      <description>&amp;gt;i have created one script&lt;BR /&gt;&amp;gt;cat two.sh&lt;BR /&gt;ssh rac1 one.sh&lt;BR /&gt;echo "Welcome to ALL"&lt;BR /&gt;&amp;gt;sh two.sh&lt;BR /&gt;&lt;BR /&gt;Ideally you should have your shell on the first line of your script and then make it executable:&lt;BR /&gt;#!absolute-shell-path&lt;BR /&gt;&lt;BR /&gt;You then could execute your script with either:&lt;BR /&gt;two.sh&lt;BR /&gt;./two.sh # depending on your $PATH</description>
      <pubDate>Wed, 15 Apr 2009 09:06:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401000#M61341</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-15T09:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to call shell script from another node?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401001#M61342</link>
      <description>Oh sry, noticed that my test string isn't gonna work.&lt;BR /&gt;&lt;BR /&gt;It'll just echo the $PATH on your local machine.&lt;BR /&gt;Might be able to do this with a eval or something else.&lt;BR /&gt;&lt;BR /&gt;Don't give me any points for this post&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
      <pubDate>Wed, 15 Apr 2009 09:28:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401001#M61342</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-04-15T09:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to call shell script from another node?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401002#M61343</link>
      <description>&amp;gt;Fredrik: It'll just echo the $PATH on your local machine.&lt;BR /&gt;&lt;BR /&gt;Put it in single quotes: ssh rac2 'echo $PATH'</description>
      <pubDate>Wed, 15 Apr 2009 23:52:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401002#M61343</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-15T23:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to call shell script from another node?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401003#M61344</link>
      <description>To execute this script yo ushould make :&lt;BR /&gt;&lt;BR /&gt;ssh rac1 "/bin/sh two.sh"&lt;BR /&gt;or &lt;BR /&gt;ssh rac1 "exec tow.sh"&lt;BR /&gt;&lt;BR /&gt;but before you make this verify if :&lt;BR /&gt;1- first line of script could have this line:&lt;BR /&gt;#/bin/sh&lt;BR /&gt;2- make your script executable by perfome this command&lt;BR /&gt;chmod 755 tow.sh&lt;BR /&gt;3- if the remote user is don't the same local user; yo ushould make -l derective like &lt;BR /&gt;ssh -l remote_user rac1 "/bin/sh two.sh"&lt;BR /&gt;&lt;BR /&gt;I hope that help you.&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Apr 2009 12:44:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-call-shell-script-from-another-node/m-p/4401003#M61344</guid>
      <dc:creator>mohamed.bouraoui</dc:creator>
      <dc:date>2009-04-24T12:44:43Z</dc:date>
    </item>
  </channel>
</rss>

