Mail Archives: cygwin/2003/11/03/07:15:50
> From: Pierre-Philippe Coupard
> Sent: Sunday, November 02, 2003 6:36 PM
> 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).
"." is shortcut for "source"
Typing this, and reading the text that appears,
should help explain things:
$ man bash
/ENVIRONMENT
$ help source
$ man bash
/BUILTIN COMMANDS$
IMO there is one big shortcoming with "source" - it can't be piped into.
/Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--
--
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/
- Raw text -