Hello,
On a Solaris 8 system in a Bourne shell script I want the user that runs a script (root) to have the environment settings that I set within my script...after the script has run.
My problem is that though I am exporting the variables in the script, after the script is run they are gone from the environment.
Below however is my environment AFTER the script:
What can you recommend?
Thanks,
Michael42
On a Solaris 8 system in a Bourne shell script I want the user that runs a script (root) to have the environment settings that I set within my script...after the script has run.
My problem is that though I am exporting the variables in the script, after the script is run they are gone from the environment.
Code:
#!/bin/sh
ORACLE_SID=DB1; export ORACLE_SID
ORACLE_BASE=/usr1/home/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2; export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
[COLOR=green]# When script run these look correct.[/color]
echo "ORACLE_SID: $ORACLE_SID"
echo "ORACLE_BASE: $ORACLE_BASE"
echo "ORACLE_HOME: $ORACLE_HOME"
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
Below however is my environment AFTER the script:
Code:
env
HOME=/
HZ=100
LOGNAME=root
PATH=/usr/sbin:/usr/bin:/usr/local/bin
SHELL=/sbin/sh
TERM=ansi
TZ=US/Eastern
What can you recommend?
Thanks,
Michael42