<?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: Variable Question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947474#M289752</link>
    <description>Hi Hunki,&lt;BR /&gt;if you want to have the full name of teh host:&lt;BR /&gt;&lt;BR /&gt;export HstNam=$(hostname|nslookup|awk '/^Name:/ {print $2}')&lt;BR /&gt;&lt;BR /&gt;bosth hostname and nslookup are in /usr/bin, but I think you don't need to sue teh fullpath, usially /usr/bin is included in default path.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art&lt;BR /&gt;</description>
    <pubDate>Tue, 20 Feb 2007 04:19:17 GMT</pubDate>
    <dc:creator>Arturo Galbiati</dc:creator>
    <dc:date>2007-02-20T04:19:17Z</dc:date>
    <item>
      <title>Variable Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947469#M289747</link>
      <description>Is this a correct variable inside a .profile for a user : &lt;BR /&gt;&lt;BR /&gt;export HostName=`/usr/ucb/hostname`&lt;BR /&gt;&lt;BR /&gt;OR whether it should be &lt;BR /&gt;&lt;BR /&gt;HostName=`/usr/ucb/hostname`&lt;BR /&gt;&lt;BR /&gt;thanks,</description>
      <pubDate>Mon, 19 Feb 2007 16:29:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947469#M289747</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-02-19T16:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947470#M289748</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Well, for HP-UX if you want to capture the server hostname and provide it to processes started after login, you would place this in the users '.profile':&lt;BR /&gt;&lt;BR /&gt;# export HostName=`/usr/bin/hostname`&lt;BR /&gt;&lt;BR /&gt;(or, using the preferred POSIX form)&lt;BR /&gt;&lt;BR /&gt;# export HostName=$(/usr/bin/hostname)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 19 Feb 2007 16:34:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947470#M289748</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-19T16:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947471#M289749</link>
      <description>/usr/ucb/hostname is for the Berkeley version of the hostname command. You should use either /bin/hostname or /usr/bin/hostname utils.</description>
      <pubDate>Mon, 19 Feb 2007 17:00:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947471#M289749</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-02-19T17:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947472#M289750</link>
      <description>I use the export so the variable will be inherent to child shells. But that is totally up to you.</description>
      <pubDate>Mon, 19 Feb 2007 17:19:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947472#M289750</guid>
      <dc:creator>hpuxrox</dc:creator>
      <dc:date>2007-02-19T17:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947473#M289751</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;It is always better to export a variable if it is used very frequently and also if its value doesn't change very frequently.&lt;BR /&gt;       also it should be user specific and hence it is appropriate to include this in the .profile file for a user.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 19 Feb 2007 23:54:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947473#M289751</guid>
      <dc:creator>Sunny Jaisinghani</dc:creator>
      <dc:date>2007-02-19T23:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947474#M289752</link>
      <description>Hi Hunki,&lt;BR /&gt;if you want to have the full name of teh host:&lt;BR /&gt;&lt;BR /&gt;export HstNam=$(hostname|nslookup|awk '/^Name:/ {print $2}')&lt;BR /&gt;&lt;BR /&gt;bosth hostname and nslookup are in /usr/bin, but I think you don't need to sue teh fullpath, usially /usr/bin is included in default path.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Feb 2007 04:19:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947474#M289752</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-02-20T04:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947475#M289753</link>
      <description>Hi Hunki,&lt;BR /&gt;We normally export such things which we used regularly. Hostname is common one. &lt;BR /&gt;&lt;BR /&gt;option is :&lt;BR /&gt;&lt;BR /&gt;# export HostName=$(/usr/bin/hostname)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Reshma</description>
      <pubDate>Tue, 20 Feb 2007 05:10:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-question/m-p/3947475#M289753</guid>
      <dc:creator>Reshma Malusare</dc:creator>
      <dc:date>2007-02-20T05:10:40Z</dc:date>
    </item>
  </channel>
</rss>

