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:45:53 +0200
Message-ID: <0F639AFBF6850240BCBADA6887DDDFCF3F20AB@mail02.vastahl.net>


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

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of manoj.gurnani_at_polaris.co.in
Sent: Monday, July 19, 2004 7:34 AM
To: oracle-l_at_freelists.org
Subject: UNIX question
Importance: High

Hi,

   In a script A(.ksh) file,If I set the PATH to some dir say A The script when called from script A,is not able to set the path to A. It is showing the default path from .profile. What settings has to be done in order to achive the above. Thanks
Manoj

This e-Mail may contain proprietary and confidential information and is = sent for the intended recipient(s) only.=20 If by an addressing or transmission error this mail has been misdirected = to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, = dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its = attachment other than by its intended recipient/s is strictly = prohibited.

Visit Us at http://www.polaris.co.in



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
-----------------------------------------------------------------
----------------------------------------------------------------
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:46:16 CDT

Original text of this message

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