<?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 Display DNS names as a prompt in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030278#M430697</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want the DNS name to get printed in the prompt of the HP-UX machine. &lt;BR /&gt;If the dns name of the machine is a.it.com then the prompt should look like&lt;BR /&gt;&lt;BR /&gt;a.it.com &amp;gt;</description>
    <pubDate>Fri, 23 Feb 2007 11:04:04 GMT</pubDate>
    <dc:creator>Anuraag</dc:creator>
    <dc:date>2007-02-23T11:04:04Z</dc:date>
    <item>
      <title>Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030278#M430697</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want the DNS name to get printed in the prompt of the HP-UX machine. &lt;BR /&gt;If the dns name of the machine is a.it.com then the prompt should look like&lt;BR /&gt;&lt;BR /&gt;a.it.com &amp;gt;</description>
      <pubDate>Fri, 23 Feb 2007 11:04:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030278#M430697</guid>
      <dc:creator>Anuraag</dc:creator>
      <dc:date>2007-02-23T11:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030279#M430698</link>
      <description>Hi,&lt;BR /&gt;and welcome to the forums !&lt;BR /&gt;&lt;BR /&gt;You can set with:&lt;BR /&gt;export PS1='a.it.com &amp;gt;'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please also read:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt; on how to reward any useful answers given to your questions.&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Feb 2007 11:07:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030279#M430698</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-23T11:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030280#M430699</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you add this to your '.profile' (Posix or Korn) shell assumed, you will display the server hostname.&lt;BR /&gt;&lt;BR /&gt;# PS1=`hostname`" # "&lt;BR /&gt;&lt;BR /&gt;Of course, change '#' to '$' for non-root accounts to differentiate them.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 23 Feb 2007 11:07:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030280#M430699</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-23T11:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030281#M430700</link>
      <description>Try this in your .profile or the /etc/profile.&lt;BR /&gt;&lt;BR /&gt;I prefer to differentiate a normal user prompt (usually a $) from the root prompt (usually a #).&lt;BR /&gt;&lt;BR /&gt;HOST=$(nslookup $(hostname) | grep Name: | awk '{print $2}'&lt;BR /&gt;export PS1="${HOST} &amp;gt;"</description>
      <pubDate>Fri, 23 Feb 2007 11:11:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030281#M430700</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-02-23T11:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030282#M430701</link>
      <description>Oops....&lt;BR /&gt;&lt;BR /&gt;I missed a closing ) in my command above.  It should be:&lt;BR /&gt;&lt;BR /&gt;HOST=$(nslookup $(hostname) | grep Name: | awk '{print $2}')</description>
      <pubDate>Fri, 23 Feb 2007 11:12:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030282#M430701</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-02-23T11:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030283#M430702</link>
      <description>Thanks Patrick,&lt;BR /&gt;&lt;BR /&gt;I am able to get that now. i just wanted to know one more thing. In TRU64, &lt;BR /&gt;&lt;BR /&gt;export PS1="`uname -n &amp;gt;"&lt;BR /&gt;&lt;BR /&gt;solves the problem. It doesnt work the same way in HP-UX?</description>
      <pubDate>Fri, 23 Feb 2007 11:19:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030283#M430702</guid>
      <dc:creator>Anuraag</dc:creator>
      <dc:date>2007-02-23T11:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030284#M430703</link>
      <description>Is it not possible by just using a single unix command to get this?</description>
      <pubDate>Fri, 23 Feb 2007 11:23:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030284#M430703</guid>
      <dc:creator>Anuraag</dc:creator>
      <dc:date>2007-02-23T11:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030285#M430704</link>
      <description>You said you wanted the "DNS NAME" for the prompt.&lt;BR /&gt;&lt;BR /&gt;In my mind the DNS name is different from the hostname or 'uname -n' output.&lt;BR /&gt;&lt;BR /&gt;Your example shows the fully qualified 'a.it.com' which you typically don't see from 'uname -n' or hostname.&lt;BR /&gt;&lt;BR /&gt;So, which do you want?&lt;BR /&gt;&lt;BR /&gt;If you just want the 'uname -n' ouput you can try:&lt;BR /&gt;&lt;BR /&gt;export PS1="$(uname -n) &amp;gt;"&lt;BR /&gt;&lt;BR /&gt;(Note the use of the $() to run commands instead of the `` (backticks).  The $() is much easier to read and does the same thing.)</description>
      <pubDate>Fri, 23 Feb 2007 11:36:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030285#M430704</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-02-23T11:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030286#M430705</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; In TRU64, export PS1="`uname -n &amp;gt;" solves the problem.&lt;BR /&gt;&lt;BR /&gt;Well, while each Unix has some minor differences, each variation has a common ancestor.  Had you provided the closing backtick (after '-n') (and perhaps quickly examined the manpages) *and* then tried your syntax at the commnad line, you would have answered and solved your own problem.  Experimentation = learning.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Feb 2007 13:29:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030286#M430705</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-23T13:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Display DNS names as a prompt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030287#M430706</link>
      <description>Got the solution</description>
      <pubDate>Thu, 29 Mar 2007 07:02:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-dns-names-as-a-prompt/m-p/5030287#M430706</guid>
      <dc:creator>Anuraag</dc:creator>
      <dc:date>2007-03-29T07:02:18Z</dc:date>
    </item>
  </channel>
</rss>

