This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: bash script does't work.
Seiji Yoneda wrote:
$ ora8i.sh <---------------- Execute this script
--8<--8<--
$ printenv ORA_HOME <---------------- After execution of script
<----------- After execution, ORA_HOME has nothing !!
$ printenv PATH <---------------- After execution, PATH does't change!!
This isn't a cygwin issue.
Because the PATH you change in your script is a variable that's local to
the shell running it. Because you call your script as a binary, another
shell is spawned (the #!/bin/sh basically tells the kernel to use
/bin/sh as the interpreter).
Try running you script as ". ora8i.sh" and it'll work : the "." is a
shell command that means "execute this shell script" (in the current shell).
--
Pierre-Philippe Coupard <pcoupard@easyconnect.fr>
Software Engineer
--
Does the name Pavlov ring a bell?
--
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/