<?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 Need Help for remsh script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585104#M856166</link>
    <description>Hello all,&lt;BR /&gt;I am try to using a script to change lines in the /etc/passwd and /etc/group on dif. servers.&lt;BR /&gt;It works on the local server but not on the remote server.&lt;BR /&gt;&lt;BR /&gt; remsh $i \                 &lt;BR /&gt; sed '/kal/s/$/,maierchr,knoerpte/' /etc/group &amp;gt; /etc/tmp_group &lt;BR /&gt;/usr/bin/mv /etc/tmp_group /etc/group  &lt;BR /&gt;                        &lt;BR /&gt;                sed '/maierchr/s/201/84/g' /etc/passwd &amp;gt; /etc/tmp_passwd        &lt;BR /&gt;/usr/bin/mv /etc/tmp_passwd /etc/passwd &lt;BR /&gt;&lt;BR /&gt;                sed '/knoerpte/s/201/84/g' /etc/passwd &amp;gt; /etc/tmp_passwd        &lt;BR /&gt;/usr/bin/mv /etc/tmp_passwd /etc/passwd &lt;BR /&gt;&lt;BR /&gt;        fi&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Peter Gaube&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 26 Sep 2001 07:28:39 GMT</pubDate>
    <dc:creator>Peter Lachnitt</dc:creator>
    <dc:date>2001-09-26T07:28:39Z</dc:date>
    <item>
      <title>Need Help for remsh script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585104#M856166</link>
      <description>Hello all,&lt;BR /&gt;I am try to using a script to change lines in the /etc/passwd and /etc/group on dif. servers.&lt;BR /&gt;It works on the local server but not on the remote server.&lt;BR /&gt;&lt;BR /&gt; remsh $i \                 &lt;BR /&gt; sed '/kal/s/$/,maierchr,knoerpte/' /etc/group &amp;gt; /etc/tmp_group &lt;BR /&gt;/usr/bin/mv /etc/tmp_group /etc/group  &lt;BR /&gt;                        &lt;BR /&gt;                sed '/maierchr/s/201/84/g' /etc/passwd &amp;gt; /etc/tmp_passwd        &lt;BR /&gt;/usr/bin/mv /etc/tmp_passwd /etc/passwd &lt;BR /&gt;&lt;BR /&gt;                sed '/knoerpte/s/201/84/g' /etc/passwd &amp;gt; /etc/tmp_passwd        &lt;BR /&gt;/usr/bin/mv /etc/tmp_passwd /etc/passwd &lt;BR /&gt;&lt;BR /&gt;        fi&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Peter Gaube&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2001 07:28:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585104#M856166</guid>
      <dc:creator>Peter Lachnitt</dc:creator>
      <dc:date>2001-09-26T07:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help for remsh script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585105#M856167</link>
      <description>Hi Peter,&lt;BR /&gt;&lt;BR /&gt;You appear to have a quote problem - as it stands, everything after the 1st sed is running locally, so:&lt;BR /&gt;&lt;BR /&gt;remove the double-quote at the end of the first sed and from both ends of the following line.  Insert a double-quote at the end of the last mv.&lt;BR /&gt;&lt;BR /&gt;             remsh $i \    &lt;BR /&gt;                "sed '/kal/s/$/,maierchr,knoerpte/' /etc/group &amp;gt; /etc/tmp_group &lt;BR /&gt;  /usr/bin/mv /etc/tmp_group /etc/group   &lt;BR /&gt;  sed '/maierchr/s/201/84/g' /etc/passwd &amp;gt; /etc/tmp_passwd &lt;BR /&gt;  /usr/bin/mv /etc/tmp_passwd /etc/passwd &lt;BR /&gt;  sed '/knoerpte/s/201/84/g' /etc/passwd &amp;gt; /etc/tmp_passwd &lt;BR /&gt;  /usr/bin/mv /etc/tmp_passwd /etc/passwd"&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Wed, 26 Sep 2001 07:44:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585105#M856167</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-09-26T07:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help for remsh script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585106#M856168</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Think you have to put your multiple commands&lt;BR /&gt;in " ", for example :&lt;BR /&gt;&lt;BR /&gt;remsh $i   "cd / ;    ls "&lt;BR /&gt;&lt;BR /&gt;And use ; to separate your commands.&lt;BR /&gt;&lt;BR /&gt;When you call remsh for more than one command&lt;BR /&gt;you must consider you are in command line and&lt;BR /&gt;want your  commands string together.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Herv?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2001 07:47:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585106#M856168</guid>
      <dc:creator>Herve BRANGIER</dc:creator>
      <dc:date>2001-09-26T07:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help for remsh script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585107#M856169</link>
      <description>Hi again&lt;BR /&gt;&lt;BR /&gt;I'm also working on scripts using remsh...&lt;BR /&gt;I saw that when you ping an unreachable host&lt;BR /&gt;return value for ping is 0 like for host you&lt;BR /&gt;can ping...&lt;BR /&gt;&lt;BR /&gt;Are you sure about your test on ping's return&lt;BR /&gt;value ?&lt;BR /&gt;&lt;BR /&gt;The only way I found was :&lt;BR /&gt;if [ -n `ping $i 100 -n 1 | grep "0 packets received"` ]&lt;BR /&gt;&lt;BR /&gt;You can also test with a remsh (remsh $i /bin/ls &amp;gt;/dev/null) it return 0 only if command&lt;BR /&gt;was executed...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Herv?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2001 07:56:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-for-remsh-script/m-p/2585107#M856169</guid>
      <dc:creator>Herve BRANGIER</dc:creator>
      <dc:date>2001-09-26T07:56:27Z</dc:date>
    </item>
  </channel>
</rss>

