<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346269#M683909</link>
    <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;double quote your long strings. ORACLE_HOME&lt;BR /&gt;&lt;BR /&gt;Change"&lt;BR /&gt;export ORACLE_HOME=$ORACL_BASE/product/bin&lt;BR /&gt;&lt;BR /&gt;to:&lt;BR /&gt;&lt;BR /&gt;export ORACLE_HOME="${ORACL_BASE}/product/bin"&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Wed, 28 Jan 2009 09:32:42 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2009-01-28T09:32:42Z</dc:date>
    <item>
      <title>setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346268#M683908</link>
      <description>Hi,&lt;BR /&gt;i have written a script with following contents and script name is "env". I actualy want my environment to be set when i execut his script.&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;export ORACLE_BASE=/oracle&lt;BR /&gt;expoer ORACLE_HOME=$ORACL_BASE/product/bin&lt;BR /&gt;&lt;BR /&gt;on prompt, i execute ". env", it returns me error mesage &lt;BR /&gt;&lt;BR /&gt;su:Syntex error: '(' is not expected.&lt;BR /&gt;&lt;BR /&gt;What is the problem an how to resolve it?&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Salman</description>
      <pubDate>Wed, 28 Jan 2009 09:30:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346268#M683908</guid>
      <dc:creator>Salman Ahmed Qureshi</dc:creator>
      <dc:date>2009-01-28T09:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346269#M683909</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;double quote your long strings. ORACLE_HOME&lt;BR /&gt;&lt;BR /&gt;Change"&lt;BR /&gt;export ORACLE_HOME=$ORACL_BASE/product/bin&lt;BR /&gt;&lt;BR /&gt;to:&lt;BR /&gt;&lt;BR /&gt;export ORACLE_HOME="${ORACL_BASE}/product/bin"&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 28 Jan 2009 09:32:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346269#M683909</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-01-28T09:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346270#M683910</link>
      <description>It works for me without any change...&lt;BR /&gt;&lt;BR /&gt;# export ORACLE_BASE=/oracle&lt;BR /&gt;# export ORACLE_HOME=$ORACLE_BASE/product/bin&lt;BR /&gt;&lt;BR /&gt;# echo $ORACLE_BASE&lt;BR /&gt;/oracle&lt;BR /&gt;# echo $ORACLE_HOME&lt;BR /&gt;/oracle/product/bin&lt;BR /&gt;&lt;BR /&gt;# echo $SHELL&lt;BR /&gt;/sbin/sh&lt;BR /&gt;&lt;BR /&gt;Are you sure you typed correctly?!</description>
      <pubDate>Wed, 28 Jan 2009 09:43:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346270#M683910</guid>
      <dc:creator>Venkatesh BL</dc:creator>
      <dc:date>2009-01-28T09:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346271#M683911</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You do:&lt;BR /&gt;&lt;BR /&gt;# . env&lt;BR /&gt;sh: Syntax error: `(' is not expected.&lt;BR /&gt;&lt;BR /&gt;No, you want,simply:&lt;BR /&gt;&lt;BR /&gt;# env&lt;BR /&gt;&lt;BR /&gt;You can redirect the output into a file:&lt;BR /&gt;&lt;BR /&gt;# env &amp;gt; myenv&lt;BR /&gt;&lt;BR /&gt;...or capture it in a variable to parse later:&lt;BR /&gt;&lt;BR /&gt;# MYENV=$(env)&lt;BR /&gt;# echo ${MYENV}&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;If you preceed the above with:&lt;BR /&gt;&lt;BR /&gt;# export ORACLE_BASE-/oracle&lt;BR /&gt;&lt;BR /&gt;...then you will see that too when you query your current environment.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Jan 2009 10:09:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346271#M683911</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-01-28T10:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346272#M683912</link>
      <description>Hello Steven, please make a corection, my name is SALMAN, not Shalom&lt;BR /&gt;I folowed your instructions but problem and error message is same&lt;BR /&gt;&lt;BR /&gt;Venkatesh, if i write it on shell prompt, it works fine, but i want to write a script file so that when i execute it in my shell, it set all envirnoments.&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Salman</description>
      <pubDate>Wed, 28 Jan 2009 10:15:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346272#M683912</guid>
      <dc:creator>Salman Ahmed Qureshi</dc:creator>
      <dc:date>2009-01-28T10:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346273#M683913</link>
      <description>Mr JAmes,&lt;BR /&gt;Thanks for your reply. i am a bit new in HP Unix, the thing i am doing works fine with Linux. I didn't get what you what ou want me to do. &lt;BR /&gt;I simpley want to set 4 environment variabes to be set when i execute a script file. I would appreciate if you could tell me how to do this in a simple way.&lt;BR /&gt;I would need a few diffirent scripts files to set my environment for different versions of oracle.&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Salman</description>
      <pubDate>Wed, 28 Jan 2009 10:18:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346273#M683913</guid>
      <dc:creator>Salman Ahmed Qureshi</dc:creator>
      <dc:date>2009-01-28T10:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346274#M683914</link>
      <description>1) put the following in a file (say 'env'):&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;export ORACLE_BASE=/oracle/aaa&lt;BR /&gt;export ORACLE_HOME=${ORACLE_BASE}/product/bin&lt;BR /&gt;&lt;BR /&gt;2) # chmod +x ./env ;; make it executable.&lt;BR /&gt;&lt;BR /&gt;3) . ./env  ;; source the file.&lt;BR /&gt;&lt;BR /&gt;4) # echo $ORACLE_BASE&lt;BR /&gt;/oracle &amp;lt;&amp;lt;</description>
      <pubDate>Wed, 28 Jan 2009 10:30:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346274#M683914</guid>
      <dc:creator>Venkatesh BL</dc:creator>
      <dc:date>2009-01-28T10:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346275#M683915</link>
      <description>Hi (again) Salman:&lt;BR /&gt;&lt;BR /&gt;You wrote:&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;export ORACLE_BASE=/oracle&lt;BR /&gt;expoer ORACLE_HOME=$ORACL_BASE/product/bin&lt;BR /&gt;&lt;BR /&gt;on prompt, i execute ". env", it returns me error mesage &lt;BR /&gt;&lt;BR /&gt;As I said, to declare and export variables into your environment do:&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;export ORACLE_BASE=/oracle&lt;BR /&gt;&lt;BR /&gt;...That is correct and you can see this in your current environment with:&lt;BR /&gt;&lt;BR /&gt;# env&lt;BR /&gt;&lt;BR /&gt;...Notice that you don't issue '. env' only 'env' at the prompt.&lt;BR /&gt;&lt;BR /&gt;NOW, if you want one shell script to pass environmental variables into another shell script, do this:&lt;BR /&gt;&lt;BR /&gt;# cat myenv&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;YOU=Shalman&lt;BR /&gt;ME=JRF&lt;BR /&gt;WHERE="at work"&lt;BR /&gt;&lt;BR /&gt;...This declares variables you want to pass around in your environment.&lt;BR /&gt;&lt;BR /&gt;# cat myscript&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;. ./myenv&lt;BR /&gt;echo "I am ${ME} and you are ${YOU} and we are ${WHERE}"&lt;BR /&gt;&lt;BR /&gt;...Notice the dot-space-filename used to source (or read) the file './myenv'.  This means that the shell (your script, 'myscript' doesn't run './myenv' but rather reads it into your _current_ environment.  Now, when you excute:&lt;BR /&gt;&lt;BR /&gt;# ./myscript&lt;BR /&gt;I am JRF and you are Shalman and we are at work&lt;BR /&gt;&lt;BR /&gt;...is displayed.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Jan 2009 10:31:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346275#M683915</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-01-28T10:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346276#M683916</link>
      <description>Hi Salman:&lt;BR /&gt;&lt;BR /&gt;My apologies for writing:&lt;BR /&gt;&lt;BR /&gt;YOU=Shalman&lt;BR /&gt;&lt;BR /&gt;...I should have written:&lt;BR /&gt;&lt;BR /&gt;YOU=Salman&lt;BR /&gt;&lt;BR /&gt;...in the 'myenv' variables :-)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 28 Jan 2009 10:34:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346276#M683916</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-01-28T10:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346277#M683917</link>
      <description>Hi,&lt;BR /&gt;Thank you very much all.&lt;BR /&gt;It works same like Linux :)&lt;BR /&gt;Only mistake i was making was to name my script "env". I have changed its name to "abc" and it is working fine&lt;BR /&gt;Thanks any way&lt;BR /&gt;&lt;BR /&gt;Salman</description>
      <pubDate>Wed, 28 Jan 2009 12:40:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346277#M683917</guid>
      <dc:creator>Salman Ahmed Qureshi</dc:creator>
      <dc:date>2009-01-28T12:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346278#M683918</link>
      <description>Hi (again) Salman:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Thank you very much all. It works same like Linux :)&lt;BR /&gt;&lt;BR /&gt;Yes, indeed, it would work the same as Linux, or rather, Linux would work the same as Unix in the regard :-)&lt;BR /&gt;&lt;BR /&gt;I see that you are new to our community.  Welcome.  If you are satisfied with the help you received, please read:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums13.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums13.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Jan 2009 12:48:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346278#M683918</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-01-28T12:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346279#M683919</link>
      <description>&amp;gt;script name is "env".&lt;BR /&gt;&lt;BR /&gt;This command is reserved and you absolutely should NOT use it.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;What is the problem and how to resolve it?&lt;BR /&gt;&lt;BR /&gt;You are probably invoking /usr/bin/env.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;please make a correction, my name is SALMAN, not Shalom&lt;BR /&gt;&lt;BR /&gt;Steven is giving you (and every reply) a polite well wishing greeting:&lt;BR /&gt;&lt;A href="http://en.wikipedia.org/wiki/Shalom" target="_blank"&gt;http://en.wikipedia.org/wiki/Shalom&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I followed your instructions but problem and error message is same&lt;BR /&gt;&lt;BR /&gt;Of course, since that wasn't your real problem, just a good practice.&lt;BR /&gt;&lt;BR /&gt;Note if you are always going to source this file, you don't need #!/sbin/sh and you shouldn't make the file executable.</description>
      <pubDate>Wed, 28 Jan 2009 13:01:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346279#M683919</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-28T13:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346280#M683920</link>
      <description>Hi Dennis&lt;BR /&gt;&lt;BR /&gt;&amp;gt;please make a correction, my name is SALMAN, not Shalom &lt;BR /&gt;&lt;BR /&gt;&amp;gt;Steven is giving you (and every reply) a polite well wishing greeting: &lt;BR /&gt;&amp;gt;&lt;A href="http://en.wikipedia.org/wiki/Shalom" target="_blank"&gt;http://en.wikipedia.org/wiki/Shalom&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Oh i am really sorry. I thought he is misspelling my name because it seemd like my own name.&lt;BR /&gt;My appologies Mr Steven&lt;BR /&gt;&lt;BR /&gt;Salman</description>
      <pubDate>Wed, 28 Jan 2009 13:18:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346280#M683920</guid>
      <dc:creator>Salman Ahmed Qureshi</dc:creator>
      <dc:date>2009-01-28T13:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: setting environment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346281#M683921</link>
      <description>Hi Salman,&lt;BR /&gt;end is a reserved word, chnage the name of your script to my_env.&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Thu, 29 Jan 2009 08:49:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-environment/m-p/4346281#M683921</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2009-01-29T08:49:14Z</dc:date>
    </item>
  </channel>
</rss>

