<?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: Executing Multiple command in remsh in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326611#M877702</link>
    <description>Hi Nikee,&lt;BR /&gt;&lt;BR /&gt;You can try&lt;BR /&gt;&lt;BR /&gt;remsh venus -l cn2adm -n "cd /usr/sap/trans/bin; /sapmnt/CN2/exe/tp CN2"&lt;BR /&gt;&lt;BR /&gt;Or you can push a script that has those two lines and execute that script.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
    <pubDate>Thu, 08 Jul 2004 11:03:25 GMT</pubDate>
    <dc:creator>Sridhar Bhaskarla</dc:creator>
    <dc:date>2004-07-08T11:03:25Z</dc:date>
    <item>
      <title>Executing Multiple command in remsh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326610#M877701</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I would like to execute the following commands from the user cn2adm. &lt;BR /&gt;cd /usr/sap/trans/bin&lt;BR /&gt;/sapmnt/CN2/exe/tp connect CN2&lt;BR /&gt;&lt;BR /&gt;Note: command has to execute under the /usr/sap/trans/bin directory.&lt;BR /&gt;&lt;BR /&gt;Now I want to execute these commands from root:&lt;BR /&gt;&lt;BR /&gt;remsh venus -l cn2adm -n cd /usr/sap/trans/bin" &lt;BR /&gt;&lt;BR /&gt;remsh venus -l cn2adm -n "/sapmnt/CN2/exe/tp connect CN2" &lt;BR /&gt;&lt;BR /&gt;Instead of multiple remsh commands, how can I execute in one remsh command?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Nikee&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jul 2004 10:57:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326610#M877701</guid>
      <dc:creator>Nikee Reddy</dc:creator>
      <dc:date>2004-07-08T10:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Multiple command in remsh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326611#M877702</link>
      <description>Hi Nikee,&lt;BR /&gt;&lt;BR /&gt;You can try&lt;BR /&gt;&lt;BR /&gt;remsh venus -l cn2adm -n "cd /usr/sap/trans/bin; /sapmnt/CN2/exe/tp CN2"&lt;BR /&gt;&lt;BR /&gt;Or you can push a script that has those two lines and execute that script.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Thu, 08 Jul 2004 11:03:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326611#M877702</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-07-08T11:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Multiple command in remsh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326612#M877703</link>
      <description>remsh venus -l cn2adm -n "cd /usr/sap/trans/bin ; /sapmnt/CN2/exe/tp connect CN2"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;should do it&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jul 2004 11:05:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326612#M877703</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2004-07-08T11:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Multiple command in remsh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326613#M877704</link>
      <description>Hai,&lt;BR /&gt;&lt;BR /&gt; remsh is going to use the remote shell. But the shell commands execution are same as local cell except the environment variables.&lt;BR /&gt;If we want to use the environment,&lt;BR /&gt;&lt;BR /&gt; remsh otherhost . .profile 2&amp;gt;&amp;amp;- \; &lt;COMMAND&gt;&lt;BR /&gt;&lt;BR /&gt; We can use the ; to add the multiple commands in remote shell as local shell.&lt;BR /&gt;&lt;BR /&gt; And We can put all commands in a file and make rcp to remote machine. Then do the remsh to execute that script commands.&lt;BR /&gt;&lt;BR /&gt; Another way as,&lt;BR /&gt;&lt;BR /&gt; echo "cd /usr/sap/trans/bin;/sapmnt/CN2/exe/tp connect CN2" | remsh &lt;OTHER-HOST&gt; "cat -"&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Muthukumar.&lt;/OTHER-HOST&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Thu, 08 Jul 2004 11:34:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/executing-multiple-command-in-remsh/m-p/3326613#M877704</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-07-08T11:34:36Z</dc:date>
    </item>
  </channel>
</rss>

