Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: UNIX question
Sorry for re-posting, but Outlook inserted "funny" characters,
now the clean version:
As an alternative to 'export PATH=3D...' you could execute the 2nd script in the same (korn)shell=20 that runs the 1st script, just use the 'dot' command:
#!/bin/ksh=20
# this is script-one
PATH=3D...
...
...
# execute script-two in the current shell, with the current environment =
and variables (PATH...)
. script-two # note the dot
But be aware of potential "side effects":=20
E.g.:
As script-two is read by the same ksh that excutes script-one,
if script-two does an 'exit', it will terminate script-one too;
when script-two does a 'cd' and execution reaches script-one again,
you get the same thing as if script-one had done the 'cd'.
Also, script-one will see all changes made=20
(working directory, environment, variables) by script-two.
It works as if script-one and script-two had been pasted together to one = script.
HTH Andreas
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Thu Jul 22 2004 - 16:51:55 CDT
![]() |
![]() |