<?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 ENV variables using a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647990#M240134</link>
    <description>Hi David,&lt;BR /&gt;&lt;BR /&gt;Simplest way is to create a file like - let's call it env_set&lt;BR /&gt;&lt;BR /&gt;ENV1=xxxxxx&lt;BR /&gt;ENV2=yyyyyy&lt;BR /&gt;ENV3=zzzzzz&lt;BR /&gt;&lt;BR /&gt;Then source the file as follows:&lt;BR /&gt;&lt;BR /&gt;. /path/to/env_set&lt;BR /&gt;&lt;BR /&gt;Then the vars remain set for that shell &amp;amp; it's children. BUT they cannot be sent back to that shell's parent.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
    <pubDate>Wed, 12 Oct 2005 14:43:19 GMT</pubDate>
    <dc:creator>Jeff Schussele</dc:creator>
    <dc:date>2005-10-12T14:43:19Z</dc:date>
    <item>
      <title>Setting ENV variables using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647989#M240133</link>
      <description>I have a number of environemnt variables that I need to set while in a shell. Rather than type "export ENV_VAR=value" a number of times, I would like to create a script to set these in my active shell.&lt;BR /&gt;&lt;BR /&gt;I created a script but it does not change the active shell. Only the script environment while running.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;David Owens</description>
      <pubDate>Wed, 12 Oct 2005 14:36:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647989#M240133</guid>
      <dc:creator>David Owens_1</dc:creator>
      <dc:date>2005-10-12T14:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Setting ENV variables using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647990#M240134</link>
      <description>Hi David,&lt;BR /&gt;&lt;BR /&gt;Simplest way is to create a file like - let's call it env_set&lt;BR /&gt;&lt;BR /&gt;ENV1=xxxxxx&lt;BR /&gt;ENV2=yyyyyy&lt;BR /&gt;ENV3=zzzzzz&lt;BR /&gt;&lt;BR /&gt;Then source the file as follows:&lt;BR /&gt;&lt;BR /&gt;. /path/to/env_set&lt;BR /&gt;&lt;BR /&gt;Then the vars remain set for that shell &amp;amp; it's children. BUT they cannot be sent back to that shell's parent.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 12 Oct 2005 14:43:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647990#M240134</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2005-10-12T14:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Setting ENV variables using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647991#M240135</link>
      <description>Hi David:&lt;BR /&gt;&lt;BR /&gt;You simply want to "source" or read a file of the variables you want into your script.  You "source" (read) a file with a dot-space character combination before a filename:&lt;BR /&gt;&lt;BR /&gt;. file_to_source&lt;BR /&gt;&lt;BR /&gt;Thus:&lt;BR /&gt;&lt;BR /&gt;# cat /tmp/my.vars&lt;BR /&gt;var1="hello"&lt;BR /&gt;var2="bye"&lt;BR /&gt;&lt;BR /&gt;# cat /tmp/my.sh&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;. /tmp/my.vars #...that is DOT-SPACE /tmp...&lt;BR /&gt;echo "I said ${var1} and then ${var2}"&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Now run /tmp/my.sh and you will see that the variables var1 and var2 are in that environment.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 12 Oct 2005 14:51:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647991#M240135</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-10-12T14:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Setting ENV variables using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647992#M240136</link>
      <description>Thanks all!&lt;BR /&gt;&lt;BR /&gt;The DOT-SPACE is what I needed.&lt;BR /&gt;&lt;BR /&gt;David</description>
      <pubDate>Wed, 12 Oct 2005 14:59:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-env-variables-using-a-script/m-p/3647992#M240136</guid>
      <dc:creator>David Owens_1</dc:creator>
      <dc:date>2005-10-12T14:59:19Z</dc:date>
    </item>
  </channel>
</rss>

