<?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 question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860990#M276751</link>
    <description>cat hostlist.txt | perl -ane '{print "$F[0] "}'&lt;BR /&gt;&lt;BR /&gt;would print the hostname. (you could use awk too if you like)&lt;BR /&gt;&lt;BR /&gt;for host in $(cat hostlist.txt | perl -ane '{print "F[0] "}'&lt;BR /&gt;do&lt;BR /&gt;  ssh -n $host&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;or as you have done it as a read..&lt;BR /&gt;while read host;&lt;BR /&gt;do&lt;BR /&gt;ssh -n ${host}&lt;BR /&gt;done &amp;lt; $(cat hostlist.txt | perl -ane '{print "F[0] "}'&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Tim</description>
    <pubDate>Tue, 12 Sep 2006 04:12:24 GMT</pubDate>
    <dc:creator>Tim D Fulford</dc:creator>
    <dc:date>2006-09-12T04:12:24Z</dc:date>
    <item>
      <title>scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860987#M276748</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;My scrpit is the following:&lt;BR /&gt;while read host;&lt;BR /&gt;do&lt;BR /&gt;ssh -n ${host}&lt;BR /&gt;done &amp;lt; hostlist.txt&lt;BR /&gt;&lt;BR /&gt;hostlist.txt contains:&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;hostname2 12 Sep 12:00&lt;BR /&gt;hostname3 12 Sep 13:00&lt;BR /&gt;&lt;BR /&gt;How to make shell get only hostname from string, so  would be able to ssh hostname1 then hostname2 etc.?</description>
      <pubDate>Tue, 12 Sep 2006 03:34:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860987#M276748</guid>
      <dc:creator>Igor Sovin</dc:creator>
      <dc:date>2006-09-12T03:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860988#M276749</link>
      <description>Hi Igor&lt;BR /&gt;&lt;BR /&gt;for i in `cat hostlist.txt | awk '{print $1}'&lt;BR /&gt;do&lt;BR /&gt;....&lt;BR /&gt;......&lt;BR /&gt;...&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Sep 2006 04:03:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860988#M276749</guid>
      <dc:creator>Murat SULUHAN</dc:creator>
      <dc:date>2006-09-12T04:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860989#M276750</link>
      <description>or if you see man read&lt;BR /&gt;match the number of parameters to the number of fields&lt;BR /&gt;&lt;BR /&gt;while read host a b c&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;which means hostname is read into host, the rest into a b and c, whcih can be ignored.</description>
      <pubDate>Tue, 12 Sep 2006 04:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860989#M276750</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-09-12T04:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860990#M276751</link>
      <description>cat hostlist.txt | perl -ane '{print "$F[0] "}'&lt;BR /&gt;&lt;BR /&gt;would print the hostname. (you could use awk too if you like)&lt;BR /&gt;&lt;BR /&gt;for host in $(cat hostlist.txt | perl -ane '{print "F[0] "}'&lt;BR /&gt;do&lt;BR /&gt;  ssh -n $host&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;or as you have done it as a read..&lt;BR /&gt;while read host;&lt;BR /&gt;do&lt;BR /&gt;ssh -n ${host}&lt;BR /&gt;done &amp;lt; $(cat hostlist.txt | perl -ane '{print "F[0] "}'&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Tue, 12 Sep 2006 04:12:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860990#M276751</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2006-09-12T04:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860991#M276752</link>
      <description>Hi Igor&lt;BR /&gt;&lt;BR /&gt;try:&lt;BR /&gt;while read host restofline;&lt;BR /&gt;do&lt;BR /&gt;ssh -n ${host}&lt;BR /&gt;done &amp;lt; hostlist.txt&lt;BR /&gt;&lt;BR /&gt;This will assign the first "word"  to $host and the rest of the line to $restofline.&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;HGH&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Sep 2006 04:18:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860991#M276752</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2006-09-12T04:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860992#M276753</link>
      <description>Thanks a lot guys!&lt;BR /&gt;All suggestions are quite good!</description>
      <pubDate>Tue, 12 Sep 2006 04:56:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3860992#M276753</guid>
      <dc:creator>Igor Sovin</dc:creator>
      <dc:date>2006-09-12T04:56:11Z</dc:date>
    </item>
  </channel>
</rss>

