RE: UNIX question

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

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@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of
manoj.gurnani@xxxxxxxxxxxxx
Sent: Monday, July 19, 2004 7:34 AM
To: oracle-l@xxxxxxxxxxxxx
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

-- Attached file included as plaintext by Ecartis --
-- File: InterScan_Disclaimer.txt

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@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
-----------------------------------------------------------------
----------------------------------------------------------------
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: