<?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: Shell Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732799#M836634</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Apart from nslookup....&lt;BR /&gt;&lt;BR /&gt;Use #hostname - that will give u the hostname&lt;BR /&gt;eg. node1&lt;BR /&gt;&lt;BR /&gt;then use #domainname - that will give you the domain name &lt;BR /&gt;eg xyz.com&lt;BR /&gt;&lt;BR /&gt;Hence use node1.xyz.com&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Piyush</description>
    <pubDate>Tue, 28 May 2002 17:34:39 GMT</pubDate>
    <dc:creator>PIYUSH D. PATEL</dc:creator>
    <dc:date>2002-05-28T17:34:39Z</dc:date>
    <item>
      <title>Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732797#M836632</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can any one tell me, is there any command to get the full hostname other than nslookup?.  When I type "echo $DISPLAY", it gives "xyz:10.0", but I need to export the DISPLAY variable to xyz.tt.nt.com:10.0 (with the full hostname).&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vasu&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 28 May 2002 17:21:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732797#M836632</guid>
      <dc:creator>Vasudevan MV</dc:creator>
      <dc:date>2002-05-28T17:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732798#M836633</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Will hostname give you what you want?&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Tue, 28 May 2002 17:30:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732798#M836633</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-05-28T17:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732799#M836634</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Apart from nslookup....&lt;BR /&gt;&lt;BR /&gt;Use #hostname - that will give u the hostname&lt;BR /&gt;eg. node1&lt;BR /&gt;&lt;BR /&gt;then use #domainname - that will give you the domain name &lt;BR /&gt;eg xyz.com&lt;BR /&gt;&lt;BR /&gt;Hence use node1.xyz.com&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Piyush</description>
      <pubDate>Tue, 28 May 2002 17:34:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732799#M836634</guid>
      <dc:creator>PIYUSH D. PATEL</dc:creator>
      <dc:date>2002-05-28T17:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732800#M836635</link>
      <description>Hi Vasudevan,&lt;BR /&gt;&lt;BR /&gt;you can put the full qualified domain name together with command substitution and a variable:&lt;BR /&gt;&lt;BR /&gt;variable=`hostname``domainname`&lt;BR /&gt;(use backticks here everywhere to get it work)&lt;BR /&gt;echo $var&lt;BR /&gt;&lt;BR /&gt;--&amp;gt; will deliver you the FQDN of that host&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Tue, 28 May 2002 17:43:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732800#M836635</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-05-28T17:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732801#M836636</link>
      <description>It seems that nslookup is going to be replaced by host. But since there is no host command in HPUX I think that you have to stick to nslookup. nslookup will search DNS but you can configure it to search on /etc/hosts if you need that.&lt;BR /&gt;&lt;BR /&gt;Otherwise is unlikely that you get a standard way to get the full qualified host name or address. My experience is that usually domainname gives you blank. Admin seldom care to initialize it properly and in these times of LDAP, yp is not so popular...&lt;BR /&gt;&lt;BR /&gt;If you need to inform DISPLAY I think that combining hostname and nslookup will do the job. Otherwise you can inspect /etc/hosts, but you can end up looking up a mere 127.0.0.1 localhost.&lt;BR /&gt;&lt;BR /&gt;Since there is no host command, my advice is &lt;BR /&gt;(sorry) nslookup</description>
      <pubDate>Tue, 28 May 2002 17:54:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732801#M836636</guid>
      <dc:creator>Miguel Covas</dc:creator>
      <dc:date>2002-05-28T17:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732802#M836637</link>
      <description>If the FQDN has been set at the last ( in the 3rd column), then this would display it:&lt;BR /&gt;&lt;BR /&gt;# cat /etc/hosts | grep `hostname` | awk '{print $3}'&lt;BR /&gt;&lt;BR /&gt;just a thought ..</description>
      <pubDate>Tue, 28 May 2002 17:58:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732802#M836637</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-05-28T17:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732803#M836638</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;It won't give you the full output, but &lt;BR /&gt;&lt;BR /&gt;# who -mT&lt;BR /&gt;&lt;BR /&gt;should do the trick&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Tue, 28 May 2002 18:38:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732803#M836638</guid>
      <dc:creator>Christopher McCray_1</dc:creator>
      <dc:date>2002-05-28T18:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732804#M836639</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hsotname is the command.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Tue, 28 May 2002 18:45:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732804#M836639</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-05-28T18:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732805#M836640</link>
      <description>Hello again&lt;BR /&gt;&lt;BR /&gt;Here is what I put into scripts for exporting displays:&lt;BR /&gt;&lt;BR /&gt;export DISPLAY=`who -mT | awk '{print $9}'`:0.0&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Tue, 28 May 2002 19:04:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732805#M836640</guid>
      <dc:creator>Christopher McCray_1</dc:creator>
      <dc:date>2002-05-28T19:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732806#M836641</link>
      <description>Whether you can see the domain name or not is very dependent on whether you use DNS, NIS or /etc/hosts for name resolution. A more general solution is to use the IP address (which takes care of everything):&lt;BR /&gt;&lt;BR /&gt;DISPLAY=12.34.56.78:0.0&lt;BR /&gt;&lt;BR /&gt;By setting the IP address, you are assured of zero problems with name resolution.</description>
      <pubDate>Tue, 28 May 2002 19:17:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732806#M836641</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-05-28T19:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732807#M836642</link>
      <description>I agree with the above post. You can simply use the ip if you can't use nslookup.&lt;BR /&gt;&lt;BR /&gt;Try the following as a slightly more robust solution.&lt;BR /&gt;&lt;BR /&gt;HOST=$(hostname)&lt;BR /&gt;CURRENT_IP=$(getip $HOST)&lt;BR /&gt;export DISPLAY=$CURRENT_IP:0.0&lt;BR /&gt;&lt;BR /&gt;Of course these can be combined into one line...&lt;BR /&gt;&lt;BR /&gt;Curious: What can't you use DNS?&lt;BR /&gt;&lt;BR /&gt;If DNS cannot be used, you may try placing host in question in the /etc/hosts, ensuring that files is before DNS in your nsswitch.conf&lt;BR /&gt;&lt;BR /&gt;Glenn</description>
      <pubDate>Wed, 29 May 2002 11:49:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2732807#M836642</guid>
      <dc:creator>Glenn L. Stewart</dc:creator>
      <dc:date>2002-05-29T11:49:29Z</dc:date>
    </item>
  </channel>
</rss>

