<?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: Command To Return Alias in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596461#M854613</link>
    <description>I guess, you might need to write a program.&lt;BR /&gt;&lt;BR /&gt;gethostent&lt;BR /&gt;&lt;BR /&gt;would be the systemcall of you choice.&lt;BR /&gt;Basic problem is, that there might be more than one alias, and which one would you focus on.&lt;BR /&gt;&lt;BR /&gt;man gethostent&lt;BR /&gt;&lt;BR /&gt;shows the datastructures for this. The only thing you need to decide is how to process the char-array of the alias entries -&amp;gt; may be "return all up to the first dot in the first alias" or so.&lt;BR /&gt;&lt;BR /&gt;This should fit onto one screen page.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;Volker</description>
    <pubDate>Wed, 17 Oct 2001 13:33:01 GMT</pubDate>
    <dc:creator>Volker Borowski</dc:creator>
    <dc:date>2001-10-17T13:33:01Z</dc:date>
    <item>
      <title>Command To Return Alias</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596458#M854610</link>
      <description>Is there a simple command to return just the alias of a machine?&lt;BR /&gt;&lt;BR /&gt;Trying DNS&lt;BR /&gt;Name:    mike.bla.com&lt;BR /&gt;Address:  1.2.3.4&lt;BR /&gt;Aliases:  dogs.bla.com&lt;BR /&gt;&lt;BR /&gt;In the above example, I would like to return just "dogs".&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 17 Oct 2001 13:10:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596458#M854610</guid>
      <dc:creator>Mike_21</dc:creator>
      <dc:date>2001-10-17T13:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Command To Return Alias</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596459#M854611</link>
      <description>&lt;BR /&gt;I dont think there is an option to nslookup to do what you want.&lt;BR /&gt;&lt;BR /&gt;You'll have to do something more complex;&lt;BR /&gt;&lt;BR /&gt;nslookup &lt;SERVER&gt; | grep Alias | awk '{print $2}'&lt;BR /&gt;&lt;BR /&gt;&lt;/SERVER&gt;</description>
      <pubDate>Wed, 17 Oct 2001 13:19:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596459#M854611</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-10-17T13:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Command To Return Alias</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596460#M854612</link>
      <description>&lt;BR /&gt;try the command:&lt;BR /&gt;&lt;BR /&gt;# nslookup mike | &lt;BR /&gt;  awk '$1 == "Aliases:" { print $2 }'</description>
      <pubDate>Wed, 17 Oct 2001 13:20:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596460#M854612</guid>
      <dc:creator>Klaus Crusius</dc:creator>
      <dc:date>2001-10-17T13:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Command To Return Alias</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596461#M854613</link>
      <description>I guess, you might need to write a program.&lt;BR /&gt;&lt;BR /&gt;gethostent&lt;BR /&gt;&lt;BR /&gt;would be the systemcall of you choice.&lt;BR /&gt;Basic problem is, that there might be more than one alias, and which one would you focus on.&lt;BR /&gt;&lt;BR /&gt;man gethostent&lt;BR /&gt;&lt;BR /&gt;shows the datastructures for this. The only thing you need to decide is how to process the char-array of the alias entries -&amp;gt; may be "return all up to the first dot in the first alias" or so.&lt;BR /&gt;&lt;BR /&gt;This should fit onto one screen page.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;Volker</description>
      <pubDate>Wed, 17 Oct 2001 13:33:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596461#M854613</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2001-10-17T13:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Command To Return Alias</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596462#M854614</link>
      <description>Well, "dogs" is not an alias for dogs.bla.com, but dogs.bla.com is an alias for mike.bla.com. If you want to strip the domain name from the alias name, then do this:&lt;BR /&gt;&lt;BR /&gt;nslookup &lt;HOST&gt; | cut -d"." -f1&lt;BR /&gt;&lt;/HOST&gt;</description>
      <pubDate>Wed, 17 Oct 2001 13:33:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596462#M854614</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-10-17T13:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Command To Return Alias</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596463#M854615</link>
      <description>Hello Mike,&lt;BR /&gt;&lt;BR /&gt;"dogs" alone may not work (depending on the contents of your "/etc/resolv.conf"), so you will have to show the FQDN, not just the "shortname"...&lt;BR /&gt;Have you tried some newer commands instead of "nslookup", like they are used for BIND9?&lt;BR /&gt;Have a look at the BIND9 documentation and have a look at the home-page of "Men&amp;amp;Mice", as they do a lot of work (and docu) on and about DNS and see especially Cricket Liu's corner (the one who did the O'Reilly book!):&lt;BR /&gt;&lt;A href="http://www.menandmice.com/9000/9300_DNS_Corner.html" target="_blank"&gt;http://www.menandmice.com/9000/9300_DNS_Corner.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch</description>
      <pubDate>Wed, 17 Oct 2001 13:43:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-return-alias/m-p/2596463#M854615</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2001-10-17T13:43:33Z</dc:date>
    </item>
  </channel>
</rss>

