This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bash script does't work.


Hi,

I'm using bash 2.05a.0(2) on win2k pro and I'm running into problems
that the bash script doesn't work as I expected.

My bash script is as follows,  

<---------------- from here the script (ora8i.sh) start
#!/usr/bin/bash

ORA_HOME='/c/oracle/ora817'
export ORA_HOME
PATH=${ORA_HOME}/bin:${PATH}
export PATH
printenv PATH 
<---------------- here the script end

When execute these commands step by step, PATH environment variable
changes. But execute above bash script, PATH environment variable doesn't
change.
What's wrong ? If someone has some idea about this problem, please help me!

$ printenv ORA_HOME   <---------------- Before execution of script
    <----------- Before execution of script, ORA_HOME has nothing.
$ printenv PATH
/usr/local/pgsql/bin:/usr/local/pgsql/lib:/usr/local/bin:/usr/bin:/bin:/c/j2sdk1
.4.2_02/bin:/c/WINNT/system32:/c/WINNT:/c/WINNT/System32/Wbem

$ ora8i.sh        <---------------- Execute this script
/c/oracle/ora817/bin:/usr/local/pgsql/bin:/usr/local/pgsql/lib:/usr/local/bin:/u
sr/bin:/bin:/c/j2sdk1.4.2_02/bin:/c/WINNT/system32:/c/WINNT:/c/WINNT/System32/Wb
em

$ printenv ORA_HOME   <---------------- After execution of script
    <----------- After execution, ORA_HOME has nothing !!
$ printenv PATH   <---------------- After execution, PATH does't change!!
/usr/local/pgsql/bin:/usr/local/pgsql/lib:/usr/local/bin:/usr/bin:/bin:/c/j2sdk1
.4.2_02/bin:/c/WINNT/system32:/c/WINNT:/c/WINNT/System32/Wbem

------------------------------------
Seiji Yoneda <s-yoneda@spn1.speednet.ne.jp>
------------------------------------



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]