<?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: Having problem with ksh, environment variable not set in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095498#M145763</link>
    <description>Sushil -&lt;BR /&gt;We often find it less cluttering to export the variables directly in the script so as not to source in more than is needed.&lt;BR /&gt;Not the answer for your why, but a solution for your problem none the less.&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
    <pubDate>Thu, 16 Oct 2003 18:12:05 GMT</pubDate>
    <dc:creator>Dave La Mar</dc:creator>
    <dc:date>2003-10-16T18:12:05Z</dc:date>
    <item>
      <title>Having problem with ksh, environment variable not set</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095496#M145761</link>
      <description>Hi all,&lt;BR /&gt;        I am trying to set some environment variable.  This variables are define in a file as export VBHOME=VHOME/xyz.  When I source this file, I get VHOME not set, but if I change the shell to sh, I don't get this issue.  Please help&lt;BR /&gt;&lt;BR /&gt;  Thanks&lt;BR /&gt;Sushil Singh</description>
      <pubDate>Thu, 16 Oct 2003 16:22:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095496#M145761</guid>
      <dc:creator>Ajay Sishodia</dc:creator>
      <dc:date>2003-10-16T16:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem with ksh, environment variable not set</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095497#M145762</link>
      <description>I believe you may have meant:&lt;BR /&gt;&lt;BR /&gt;  export VBHOME=$VHOME/xyz&lt;BR /&gt;&lt;BR /&gt;right?&lt;BR /&gt;&lt;BR /&gt;If so, try adding a "set +u" (the opposite of "set -u") to the script before you try to dereference VHOME. ksh is likely treating unset variables as errors. &lt;BR /&gt;&lt;BR /&gt;$ echo $ASDF&lt;BR /&gt;&lt;BR /&gt;$ set -u&lt;BR /&gt;$ echo $ASDF&lt;BR /&gt;ksh: ASDF: parameter not set&lt;BR /&gt;$ set +u&lt;BR /&gt;$ echo $ASDF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You can use $- to determine if "u" is set or unset:&lt;BR /&gt;&lt;BR /&gt;$ echo $-&lt;BR /&gt;ism&lt;BR /&gt;$ set -u&lt;BR /&gt;$ echo $-&lt;BR /&gt;isum&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Oct 2003 18:08:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095497#M145762</guid>
      <dc:creator>Charles Slivkoff</dc:creator>
      <dc:date>2003-10-16T18:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem with ksh, environment variable not set</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095498#M145763</link>
      <description>Sushil -&lt;BR /&gt;We often find it less cluttering to export the variables directly in the script so as not to source in more than is needed.&lt;BR /&gt;Not the answer for your why, but a solution for your problem none the less.&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
      <pubDate>Thu, 16 Oct 2003 18:12:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095498#M145763</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2003-10-16T18:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem with ksh, environment variable not set</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095499#M145764</link>
      <description>look at het man page of ksh :&lt;BR /&gt;you can use ${parameter:-word} &lt;BR /&gt;&lt;BR /&gt;export VBHOME=${VHOME:-""}/xyz</description>
      <pubDate>Fri, 17 Oct 2003 04:05:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095499#M145764</guid>
      <dc:creator>hein coulier</dc:creator>
      <dc:date>2003-10-17T04:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem with ksh, environment variable not set</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095500#M145765</link>
      <description>So what shell are you using to start with?&lt;BR /&gt; &lt;BR /&gt;How are you sourcing this file because I can't think of any circumstances where "export VBHOME=VHOME/xyz" will produce an error.  Even if this a typo and it should read $VHOME it still shouldn't produce an error.</description>
      <pubDate>Fri, 17 Oct 2003 04:12:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095500#M145765</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-10-17T04:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem with ksh, environment variable not set</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095501#M145766</link>
      <description>Sushil,&lt;BR /&gt;&lt;BR /&gt;How you are posting questions using my ID???????? I don't think I know you. Did you hack into my account on ITRC?&lt;BR /&gt;&lt;BR /&gt;Ajay</description>
      <pubDate>Fri, 17 Oct 2003 09:12:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095501#M145766</guid>
      <dc:creator>Ajay Sishodia</dc:creator>
      <dc:date>2003-10-17T09:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem with ksh, environment variable not set</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095502#M145767</link>
      <description>If you want to set a default location in the event that VHOME is not set type:&lt;BR /&gt;&lt;BR /&gt;VBHOME=${VHOME:-/usr/local}/xyz&lt;BR /&gt;&lt;BR /&gt;If $VHOME is not set then VBHOME will be set to:&lt;BR /&gt;&lt;BR /&gt;/usr/local/xyz</description>
      <pubDate>Fri, 17 Oct 2003 11:27:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-problem-with-ksh-environment-variable-not-set/m-p/3095502#M145767</guid>
      <dc:creator>David Andrews_1</dc:creator>
      <dc:date>2003-10-17T11:27:58Z</dc:date>
    </item>
  </channel>
</rss>

