<?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: looking for a simple way to organize envs on our unix box... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126201#M448775</link>
    <description>"If I run the individual scripts from CL, it sets my env correctly...so it's not the individual env scripts."  Doubtful. How are you "running" them? &lt;BR /&gt;&lt;BR /&gt;As for the remainder of the problem:&lt;BR /&gt;&lt;BR /&gt;that is the normal behaviour...you are altering the ENV of the child process, so the changes "disappear" when the child ends.&lt;BR /&gt;&lt;BR /&gt;you need to "dot-in" (source) both the menu script AND the scripts run by the menu to change the environment.&lt;BR /&gt;&lt;BR /&gt;ie:&lt;BR /&gt;.  /home/is/bin/r12MENU.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and within r12MENU.sh each selected item must be "sourced" as well&lt;BR /&gt;&lt;BR /&gt;Alternatively, one *might*, for each "selection":&lt;BR /&gt;a) Set environment&lt;BR /&gt;b) execute a "new" shell.  Puts you in a sub-shell with the "correct" environment&lt;BR /&gt;c) exit the sub-shell, which should return you to the menu script.&lt;BR /&gt;&lt;BR /&gt;Can't vouch for the later, as I've not tried it.</description>
    <pubDate>Mon, 25 Aug 2008 15:56:38 GMT</pubDate>
    <dc:creator>OldSchool</dc:creator>
    <dc:date>2008-08-25T15:56:38Z</dc:date>
    <item>
      <title>looking for a simple way to organize envs on our unix box...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126200#M448774</link>
      <description>would like to standardize how we set envs on our unix box, so I thought a menu would be a great way to accomplish this.&lt;BR /&gt;&lt;BR /&gt;The problem I'm experiencing, is the value is set...but ONLY during the time the menu is initiated.&lt;BR /&gt;&lt;BR /&gt;please see below:&lt;BR /&gt;&amp;gt; /home/is/bin/r12MENU.sh&lt;BR /&gt;**================================================================**&lt;BR /&gt;** to Set your environment, select one of the following: **&lt;BR /&gt;** 1.) DEVSID - Development Environments **&lt;BR /&gt;** 2.) UATSID - CRP2/UAT Environments **&lt;BR /&gt;** 3.) GLDSID - GOLD Environments **&lt;BR /&gt;** 4.) APPSSID - PROD Environments **&lt;BR /&gt;** e.) EXIT this menu **&lt;BR /&gt;**================================================================**&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;** Enter your response (1, 2, 3, 4 or [e]): 1&lt;BR /&gt;&lt;BR /&gt;**=========================================================**&lt;BR /&gt;** You have chosen DEVSID - Development Environments **&lt;BR /&gt;** **&lt;BR /&gt;** your environment will now be set... **&lt;BR /&gt;**=========================================================**&lt;BR /&gt;devsid&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the devsid you see above is an ECHO within the menu script on oracle_sid.&lt;BR /&gt;so I know it's setting the correct env, but only during the running of the menu-script.&lt;BR /&gt;&lt;BR /&gt;If I perform an echo from command line...it's set to whatever was defined before running the menu.&lt;BR /&gt;&lt;BR /&gt;If I run the individual scripts from CL, it sets my env correctly...so it's not the individual env scripts.&lt;BR /&gt;&lt;BR /&gt;any assistance would be appreciated,&lt;BR /&gt;manny</description>
      <pubDate>Mon, 25 Aug 2008 15:27:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126200#M448774</guid>
      <dc:creator>Manuel Contreras</dc:creator>
      <dc:date>2008-08-25T15:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: looking for a simple way to organize envs on our unix box...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126201#M448775</link>
      <description>"If I run the individual scripts from CL, it sets my env correctly...so it's not the individual env scripts."  Doubtful. How are you "running" them? &lt;BR /&gt;&lt;BR /&gt;As for the remainder of the problem:&lt;BR /&gt;&lt;BR /&gt;that is the normal behaviour...you are altering the ENV of the child process, so the changes "disappear" when the child ends.&lt;BR /&gt;&lt;BR /&gt;you need to "dot-in" (source) both the menu script AND the scripts run by the menu to change the environment.&lt;BR /&gt;&lt;BR /&gt;ie:&lt;BR /&gt;.  /home/is/bin/r12MENU.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and within r12MENU.sh each selected item must be "sourced" as well&lt;BR /&gt;&lt;BR /&gt;Alternatively, one *might*, for each "selection":&lt;BR /&gt;a) Set environment&lt;BR /&gt;b) execute a "new" shell.  Puts you in a sub-shell with the "correct" environment&lt;BR /&gt;c) exit the sub-shell, which should return you to the menu script.&lt;BR /&gt;&lt;BR /&gt;Can't vouch for the later, as I've not tried it.</description>
      <pubDate>Mon, 25 Aug 2008 15:56:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126201#M448775</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-08-25T15:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: looking for a simple way to organize envs on our unix box...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126202#M448776</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;1) Figure out what is common to all environments.&lt;BR /&gt;&lt;BR /&gt;2) Rather than have a menu required for login which can mess up the users if they want to automate some of their work, have a little script that pops up. User types myenv. Then the menu comes up and sources one of the 4 environment files. Set up a default or set a single variable for each user with the best guess for what they do. if [ "$USENV" == "dev" ] then . devenv&lt;BR /&gt;&lt;BR /&gt;Something like that.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 25 Aug 2008 16:36:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126202#M448776</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-08-25T16:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: looking for a simple way to organize envs on our unix box...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126203#M448777</link>
      <description>referencing the menus and env scripts with ". menu.sh" worked like a charm.&lt;BR /&gt;&lt;BR /&gt;cross this one off the list :)&lt;BR /&gt;&lt;BR /&gt;thanks guys</description>
      <pubDate>Mon, 25 Aug 2008 17:25:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-a-simple-way-to-organize-envs-on-our-unix-box/m-p/5126203#M448777</guid>
      <dc:creator>Manuel Contreras</dc:creator>
      <dc:date>2008-08-25T17:25:43Z</dc:date>
    </item>
  </channel>
</rss>

