Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: UNIX question

RE: UNIX question

From: <Andreas.Haunschmidt_at_voestalpine.com>
Date: Thu, 22 Jul 2004 23:54:47 +0200
Message-ID: <0F639AFBF6850240BCBADA6887DDDFCF282723@mail02.vastahl.net>


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_at_freelists.org put 'unsubscribe' in the subject line.
--
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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US