<?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: Script problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075169#M141505</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;No I still get the same answer</description>
    <pubDate>Fri, 19 Sep 2003 12:07:32 GMT</pubDate>
    <dc:creator>Jeff Picton</dc:creator>
    <dc:date>2003-09-19T12:07:32Z</dc:date>
    <item>
      <title>Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075167#M141503</link>
      <description>Please see the script below. Whenever I run it , I get unknown host name. I do not know why&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;   if [ $# -lt 1 ]&lt;BR /&gt;   then&lt;BR /&gt;      echo "\nUsage: $0 &lt;HOSTNAME&gt;"&lt;BR /&gt;      exit 1&lt;BR /&gt;   fi&lt;BR /&gt;&lt;BR /&gt;   HOST=$1&lt;BR /&gt;   A=`/usr/bin/grep $HOST /etc/hosts | awk '{print$2}' | wc -l`&lt;BR /&gt;   if [ A -gt 0 ] then&lt;BR /&gt;   # Run remote shell to remote host and export display&lt;BR /&gt;   exec /usr/bin/remsh $HOST -n /usr/bin/X11/dtterm -display $DISPLAY&lt;BR /&gt;   -ls -title $HOST -n $HOST -sb -sl 500 &amp;amp;&lt;BR /&gt;   else&lt;BR /&gt;   echo "Unknown host...please try again"&lt;BR /&gt;   fi&lt;BR /&gt;   done&lt;BR /&gt;&lt;/HOSTNAME&gt;</description>
      <pubDate>Fri, 19 Sep 2003 12:01:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075167#M141503</guid>
      <dc:creator>Jeff Picton</dc:creator>
      <dc:date>2003-09-19T12:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075168#M141504</link>
      <description>I think you missed out a $ here&lt;BR /&gt;&lt;BR /&gt;if [ A -gt 0 ] then&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It should be &lt;BR /&gt;&lt;BR /&gt;if [ $A -gt 0 ]&lt;BR /&gt;&lt;BR /&gt;Those are the really annoying ones!</description>
      <pubDate>Fri, 19 Sep 2003 12:06:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075168#M141504</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-19T12:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075169#M141505</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;No I still get the same answer</description>
      <pubDate>Fri, 19 Sep 2003 12:07:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075169#M141505</guid>
      <dc:creator>Jeff Picton</dc:creator>
      <dc:date>2003-09-19T12:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075170#M141506</link>
      <description>Jeff,&lt;BR /&gt;  Does that host is listed in /etc/hosts?&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
      <pubDate>Fri, 19 Sep 2003 12:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075170#M141506</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-09-19T12:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075171#M141507</link>
      <description>Shame,&lt;BR /&gt;&lt;BR /&gt;Ok, firstly&lt;BR /&gt;&lt;BR /&gt;That whole line looks a bit overly complicated to me.&lt;BR /&gt;&lt;BR /&gt;How about&lt;BR /&gt;&lt;BR /&gt;grep $HOST /etc/hosts &amp;gt; /dev/null &amp;amp;&amp;amp; {&lt;BR /&gt; exec /usr/bin/remsh $HOST -n /usr/bin/X11/dtterm -display $DISPLAY -ls -title $HOST -n $HOST -sb -sl 500 &amp;amp;&lt;BR /&gt; exit&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;echo "Unknown host.... please try again"</description>
      <pubDate>Fri, 19 Sep 2003 12:11:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075171#M141507</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-19T12:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075172#M141508</link>
      <description>Jeff,&lt;BR /&gt;&lt;BR /&gt;change  &lt;BR /&gt;&lt;BR /&gt;if [ A -gt 0 ] then &lt;BR /&gt;&lt;BR /&gt;to &lt;BR /&gt;&lt;BR /&gt;if [ A -gt 0 ]; then &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and try it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Sep 2003 12:15:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075172#M141508</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-09-19T12:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075173#M141509</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Thanks for all that answered. &lt;BR /&gt;&lt;BR /&gt;Firstly I was running the script from the wrong area and it was picking up the wrong executable.&lt;BR /&gt;&lt;BR /&gt;Secondly its Friday...doh&lt;BR /&gt;&lt;BR /&gt;This now works.</description>
      <pubDate>Fri, 19 Sep 2003 12:18:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075173#M141509</guid>
      <dc:creator>Jeff Picton</dc:creator>
      <dc:date>2003-09-19T12:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075174#M141510</link>
      <description>and drop the awk part. counting lines with wc -l will not change if the line is shorter :)&lt;BR /&gt;&lt;BR /&gt;if [ `grep $HOST /etc/hosts | wc -l` -gt 0 ]; then&lt;BR /&gt;&lt;BR /&gt;And grep returns a status, so you don't even need the wc, see MArk's example&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Sep 2003 12:19:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075174#M141510</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-09-19T12:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075175#M141511</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;please consider:&lt;BR /&gt;if the whole stuff is tried in an NIS or DNS environment, depending on /etc/nswitch.conf it&lt;BR /&gt;may be totally meaningless, if 'grep' succeeds in&lt;BR /&gt;/etc/hosts or not ...&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Fri, 19 Sep 2003 14:02:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3075175#M141511</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2003-09-19T14:02:15Z</dc:date>
    </item>
  </channel>
</rss>

