RE: UNIX question

  • From: <Andreas.Haunschmidt@xxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 22 Jul 2004 23:54:47 +0200

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

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: