<?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 hard coding hostname for an application in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325490#M188174</link>
    <description>Hi,&lt;BR /&gt;Could you please educate me ,what does it mean &lt;BR /&gt;hardcoding an ip or hostname for an application.&lt;BR /&gt;Thanks for your time.</description>
    <pubDate>Wed, 07 Jul 2004 11:09:39 GMT</pubDate>
    <dc:creator>navin</dc:creator>
    <dc:date>2004-07-07T11:09:39Z</dc:date>
    <item>
      <title>hard coding hostname for an application</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325490#M188174</link>
      <description>Hi,&lt;BR /&gt;Could you please educate me ,what does it mean &lt;BR /&gt;hardcoding an ip or hostname for an application.&lt;BR /&gt;Thanks for your time.</description>
      <pubDate>Wed, 07 Jul 2004 11:09:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325490#M188174</guid>
      <dc:creator>navin</dc:creator>
      <dc:date>2004-07-07T11:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding hostname for an application</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325491#M188175</link>
      <description>As I interpret the expression, harcoding is using a literal expression rather than an environment variable, such as 140.140.140.140 rather than $IP for an IP address.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 07 Jul 2004 11:12:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325491#M188175</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-07-07T11:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding hostname for an application</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325492#M188176</link>
      <description>Do you want to run application on only the host where the hostname matches??? So as to avoid to copy it on other hosts and run there???&lt;BR /&gt;&lt;BR /&gt;In that case have you looked at i4admin?? man i4admin, you can bind application to run on specific host only. Rather to a cpu.&lt;BR /&gt;&lt;BR /&gt;hostname can be changed, so you will have to change the application also.&lt;BR /&gt;&lt;BR /&gt;man i4admin and reated commands.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 07 Jul 2004 11:16:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325492#M188176</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-07-07T11:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding hostname for an application</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325493#M188177</link>
      <description>here is an example of hardcoding&lt;BR /&gt;&lt;BR /&gt; HOST="navinhost"&lt;BR /&gt; if [[ "$HOST" = "navinhost" ]]&lt;BR /&gt; then&lt;BR /&gt;    ..&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;In the above example you are basically hardcording the hostname.&lt;BR /&gt;&lt;BR /&gt; HOST=$(hostname)&lt;BR /&gt; if [[ "$HOST" = "navinhost" ]]&lt;BR /&gt;&lt;BR /&gt;The above excerpt is preferred over hardcoding for couple of reasons&lt;BR /&gt;&lt;BR /&gt;1) easily portable -you can use the same code in more than one machine without any need to edit and customize the code for specific nodes&lt;BR /&gt;&lt;BR /&gt;2) any changes to the system that could effect the inputs to the application would not mean you have to rewrite the application - In the above ex, if you have hardcoded the hostname, whenever the hostname is changed, then you have to edit and make changes to the code.</description>
      <pubDate>Wed, 07 Jul 2004 11:16:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325493#M188177</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-07-07T11:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding hostname for an application</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325494#M188178</link>
      <description>Pete's given the gist of it, but we can probably be a lot more helpful with a little more information about the problem or context.</description>
      <pubDate>Wed, 07 Jul 2004 11:18:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325494#M188178</guid>
      <dc:creator>W.C. Epperson</dc:creator>
      <dc:date>2004-07-07T11:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding hostname for an application</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325495#M188179</link>
      <description>"Hardcoding" whether it's a hostname, IP address, or any other value simply means embedding that value into the program or script so that it is not configurable. The practice is generally discouraged. There are several methods for "softcoding" values: 1) pass the data on the command line 2) set and export environment variables 3) store the data in a configuration file. The advantage of "softcoding" is that these values can be easily changed without having to change the source code and/or compile the program.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Jul 2004 11:20:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325495#M188179</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-07-07T11:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding hostname for an application</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325496#M188180</link>
      <description>Thanks for taking time to reply.Useful informations.Thanks again.</description>
      <pubDate>Wed, 07 Jul 2004 13:26:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hard-coding-hostname-for-an-application/m-p/3325496#M188180</guid>
      <dc:creator>navin</dc:creator>
      <dc:date>2004-07-07T13:26:49Z</dc:date>
    </item>
  </channel>
</rss>

