<?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: setting the variable in the script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080699#M309031</link>
    <description>i think that , you  need to issue " echo $JAVA_DIR "  to see the variavle value. &lt;BR /&gt;&lt;BR /&gt;if you still facing the problem plese send the script&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;Prasanth</description>
    <pubDate>Thu, 04 Oct 2007 03:52:34 GMT</pubDate>
    <dc:creator>Prasanth V Aravind</dc:creator>
    <dc:date>2007-10-04T03:52:34Z</dc:date>
    <item>
      <title>setting the variable in the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080694#M309026</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am setting a variable in the script and using it later to process something.  When I echo the variable it has value.  But actually when I use it looses it value.  But when I harcoded the value instead of exported variable name it worked.  &lt;BR /&gt;&lt;BR /&gt;O.S IS hp-ux 11.23 &lt;BR /&gt;&lt;BR /&gt;Has anyone aware of this type of a problem?&lt;BR /&gt;&lt;BR /&gt;EX:  export JAVA_DIR=/opt/java1.4/jre&lt;BR /&gt;$JAVA_DIR does not work.&lt;BR /&gt;&lt;BR /&gt;If I hard code /opt/java1.4/jre IT WORKS.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Raji</description>
      <pubDate>Wed, 03 Oct 2007 13:50:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080694#M309026</guid>
      <dc:creator>sheevm</dc:creator>
      <dc:date>2007-10-03T13:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: setting the variable in the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080695#M309027</link>
      <description>You need to echo the variable to use its value i.e.&lt;BR /&gt;&lt;BR /&gt;# export JAVA_DIR=/opt/java1.4/jre&lt;BR /&gt;# echo $JAVA_DIR&lt;BR /&gt;/opt/java1.4/jre</description>
      <pubDate>Wed, 03 Oct 2007 14:03:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080695#M309027</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-10-03T14:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: setting the variable in the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080696#M309028</link>
      <description>If you want to set a variable in a script and to use it out of the script, you have to work in a shell, called from within the script.&lt;BR /&gt;Can you please explain the problem more detailed ?</description>
      <pubDate>Wed, 03 Oct 2007 14:13:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080696#M309028</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2007-10-03T14:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: setting the variable in the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080697#M309029</link>
      <description>w/o the code, or least the "broken" part, its hard to tell what's going on.&lt;BR /&gt;&lt;BR /&gt;"$JAVA_DIR" doesn't work?  What are you expecting it to do and what if anything does "echo $JAVA_DIR" say?&lt;BR /&gt;&lt;BR /&gt;If it's blank, are you:&lt;BR /&gt;&lt;BR /&gt;Running a script then checking after it finishes?  If so, I'd expect it not to be set, as you did it in a separate process and it went away when the script finished.  the fix for this one "source" or "dot" the script when you run it. as in ". ./mystuff.sh"&lt;BR /&gt;&lt;BR /&gt;Are you running a script that runs another script to set it.  in this case, in the initial script, source or dot the second script as noted above</description>
      <pubDate>Wed, 03 Oct 2007 14:14:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080697#M309029</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-10-03T14:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: setting the variable in the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080698#M309030</link>
      <description>Hi Raji,&lt;BR /&gt;please, post the peice of code that doesn't work to further help.&lt;BR /&gt;Rgds,&lt;BR /&gt;Art</description>
      <pubDate>Thu, 04 Oct 2007 02:45:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080698#M309030</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-10-04T02:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: setting the variable in the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080699#M309031</link>
      <description>i think that , you  need to issue " echo $JAVA_DIR "  to see the variavle value. &lt;BR /&gt;&lt;BR /&gt;if you still facing the problem plese send the script&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;Prasanth</description>
      <pubDate>Thu, 04 Oct 2007 03:52:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080699#M309031</guid>
      <dc:creator>Prasanth V Aravind</dc:creator>
      <dc:date>2007-10-04T03:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: setting the variable in the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080700#M309032</link>
      <description>&lt;BR /&gt;Hi Raji, &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Plaese try like this &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[root@steelmatrix ~]# export JAVA_DIR=/opt/java1.4/jre&lt;BR /&gt;[root@steelmatrix ~]# echo $JAVA_DIR&lt;BR /&gt;/opt/java1.4/jre&lt;BR /&gt;[root@steelmatrix ~]#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;Prasanth</description>
      <pubDate>Thu, 04 Oct 2007 03:54:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-the-variable-in-the-script/m-p/4080700#M309032</guid>
      <dc:creator>Prasanth V Aravind</dc:creator>
      <dc:date>2007-10-04T03:54:31Z</dc:date>
    </item>
  </channel>
</rss>

