<?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 environment variables through script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014616#M772291</link>
    <description>Thanks a lot for the suggestions</description>
    <pubDate>Mon, 20 Nov 2006 00:42:19 GMT</pubDate>
    <dc:creator>devhariprasad</dc:creator>
    <dc:date>2006-11-20T00:42:19Z</dc:date>
    <item>
      <title>Setting environment variables through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014612#M772287</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to set an environment variable through a script. When the script is executed, it run in a new shell and the environment variable is available only in this child shell. But how to make it available to even the parent shell.&lt;BR /&gt;&lt;BR /&gt;Please give your ideas.</description>
      <pubDate>Fri, 17 Nov 2006 02:15:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014612#M772287</guid>
      <dc:creator>devhariprasad</dc:creator>
      <dc:date>2006-11-17T02:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Setting environment variables through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014613#M772288</link>
      <description>Hi,&lt;BR /&gt;please see my example:&lt;BR /&gt;&lt;BR /&gt;$ cat e.sh&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo "DATA before = [$DATA]"&lt;BR /&gt;. ./f.sh&lt;BR /&gt;echo "DATA after = [$DATA]"&lt;BR /&gt;&lt;BR /&gt;$ cat f.sh&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;DATA="this is new"&lt;BR /&gt;export DATA&lt;BR /&gt;&lt;BR /&gt;$  ./e.sh&lt;BR /&gt;DATA before = []&lt;BR /&gt;DATA after = [this is new]</description>
      <pubDate>Fri, 17 Nov 2006 03:07:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014613#M772288</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-11-17T03:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Setting environment variables through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014614#M772289</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can do this, using the dot operator.&lt;BR /&gt;Create a small shell script that makes the changes to the environment variable, something like this perhaps:&lt;BR /&gt;&lt;BR /&gt;export MY_PATH=~/bin&lt;BR /&gt;&lt;BR /&gt;Name this shell script myscript.sh and then, from a shell prompt, type:&lt;BR /&gt;&lt;BR /&gt;. myscript.sh&lt;BR /&gt;&lt;BR /&gt;(dot space myscript.sh)&lt;BR /&gt;This will run the shell script myscript.sh in your current shell.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Joel</description>
      <pubDate>Fri, 17 Nov 2006 03:09:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014614#M772289</guid>
      <dc:creator>Joel Girot</dc:creator>
      <dc:date>2006-11-17T03:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Setting environment variables through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014615#M772290</link>
      <description>Besides using "." or source (csh), you can use the following trick that resize uses:&lt;BR /&gt;$ resize&lt;BR /&gt;COLUMNS=80;&lt;BR /&gt;LINES=36;&lt;BR /&gt;export COLUMNS LINES;&lt;BR /&gt;&lt;BR /&gt;Resize just echoes some commands.  Then you just use the eval builting:&lt;BR /&gt;&lt;BR /&gt;$ eval $(resize)</description>
      <pubDate>Fri, 17 Nov 2006 21:30:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014615#M772290</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-11-17T21:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Setting environment variables through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014616#M772291</link>
      <description>Thanks a lot for the suggestions</description>
      <pubDate>Mon, 20 Nov 2006 00:42:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment-variables-through-script/m-p/5014616#M772291</guid>
      <dc:creator>devhariprasad</dc:creator>
      <dc:date>2006-11-20T00:42:19Z</dc:date>
    </item>
  </channel>
</rss>

