<?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: Scripting for rhosts format in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471134#M211792</link>
    <description>Hi, Sorry...the attached output is not so clear.&lt;BR /&gt;&lt;BR /&gt;The format should be :&lt;BR /&gt;&lt;BR /&gt;Remote server  UserID  Justification&lt;BR /&gt;bdhp4337 root  &lt;BR /&gt;192.44.190.109 root&lt;BR /&gt;&lt;BR /&gt;rshj   root # 03152004:...&lt;BR /&gt;bdhp4259   root # 03172004:... &lt;BR /&gt;</description>
    <pubDate>Wed, 26 Jan 2005 01:01:28 GMT</pubDate>
    <dc:creator>Dewa Negara_4</dc:creator>
    <dc:date>2005-01-26T01:01:28Z</dc:date>
    <item>
      <title>Scripting for rhosts format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471133#M211791</link>
      <description>Hi All, &lt;BR /&gt;&lt;BR /&gt;I want to create a script to generate a neat report for my all rhosts file. For instance, I have a rhosts file as below :&lt;BR /&gt;&lt;BR /&gt;#cat /root/.rhosts&lt;BR /&gt;&lt;BR /&gt;bdhp4337.na.pg.com root&lt;BR /&gt;192.44.190.109 root&lt;BR /&gt;rshj root       # 03152004:RSHJ reporting tool:paul@test.com:NEVER:john@test.com&lt;BR /&gt;bdhp4259 root   # 03172004:NP1 database server:paul@test.com:NEVER:john@test.com&lt;BR /&gt;&lt;BR /&gt;and I want to generate a report with format as below :&lt;BR /&gt;&lt;BR /&gt;Remote server        UserID      Justification&lt;BR /&gt;-------------------------------------------------------&lt;BR /&gt;bdhp4337  root  &lt;BR /&gt;192.44.190.109  root&lt;BR /&gt;rshj   root  # 03152004:RSHJ reporting tool:paul@test.com:NEVER:john@test.com&lt;BR /&gt;bdhp4259  root  # 03172004:NP1 database server:paul@test.com:NEVER:john@test.com&lt;BR /&gt;&lt;BR /&gt;How can I do that using a shell scripting?&lt;BR /&gt;&lt;BR /&gt;Pls help. High score will be given. &lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Dewa&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Jan 2005 00:56:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471133#M211791</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2005-01-26T00:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting for rhosts format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471134#M211792</link>
      <description>Hi, Sorry...the attached output is not so clear.&lt;BR /&gt;&lt;BR /&gt;The format should be :&lt;BR /&gt;&lt;BR /&gt;Remote server  UserID  Justification&lt;BR /&gt;bdhp4337 root  &lt;BR /&gt;192.44.190.109 root&lt;BR /&gt;&lt;BR /&gt;rshj   root # 03152004:...&lt;BR /&gt;bdhp4259   root # 03172004:... &lt;BR /&gt;</description>
      <pubDate>Wed, 26 Jan 2005 01:01:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471134#M211792</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2005-01-26T01:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting for rhosts format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471135#M211793</link>
      <description>Hi Dewa&lt;BR /&gt;.rhosts file is setting permission for rcp (remote copy).&lt;BR /&gt;It is hard to understand for me.&lt;BR /&gt;If you want to create script copy file from serverA to serverB.&lt;BR /&gt;On serverB edit ~.rhosts file&lt;BR /&gt;#vi ~.rhosts&lt;BR /&gt;serverA root&lt;BR /&gt;at serverA:&lt;BR /&gt;#rcp -r -p /path/file_or_dir serverB:/path/&lt;BR /&gt;HTH&lt;BR /&gt;tienna</description>
      <pubDate>Wed, 26 Jan 2005 02:02:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471135#M211793</guid>
      <dc:creator>Nguyen Anh Tien</dc:creator>
      <dc:date>2005-01-26T02:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting for rhosts format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471136#M211794</link>
      <description>Hi Dewa&lt;BR /&gt;&lt;BR /&gt;If I understand correctly (I hope I do!) try this:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;echo "HOST\tUSER\tCOMMENT" &amp;gt;/tmp/report&lt;BR /&gt;cat /root/.rhosts | while read HOST USER COMM&lt;BR /&gt;do&lt;BR /&gt;COMMENT=`echo $COMM | sed 's/ /_/g'`&lt;BR /&gt;echo "$HOST\t$USER\t$COMMENT" &amp;gt;&amp;gt;/tmp/report&lt;BR /&gt;done&lt;BR /&gt;cat /tmp/report | pr -e15&lt;BR /&gt;&lt;BR /&gt;Note:- We have to pump the comment field through 'sed' to get rid of the spaces.  This would cause the output to look strange.  You may need to scroll-up to view the output as 'pr' paginates the file.&lt;BR /&gt;&lt;BR /&gt;Best regards - Keith</description>
      <pubDate>Wed, 26 Jan 2005 02:52:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-for-rhosts-format/m-p/3471136#M211794</guid>
      <dc:creator>Keith Bryson</dc:creator>
      <dc:date>2005-01-26T02:52:19Z</dc:date>
    </item>
  </channel>
</rss>

