I have a ksh script which is run as root user.
In variables section there is set a host dependent variable
DBCHANGE
This DBCHANGE is used for doing some simple modification in database.
This script is implemented on serveral hosts - on each one DBCHANGE is differnet one.
Question:
how to put this variable (from root env) to the following command executed in the script:
su - dbadmin -c 'db2sciprt $DBCHANGE'
to have it recognized in dbadmin env. I need to run "su -" to get full dbadmin env.
Is it necessary to put this variable to dbadmin env (to profile)???
thx in advance for a tip,
rm.
In variables section there is set a host dependent variable
DBCHANGE
This DBCHANGE is used for doing some simple modification in database.
This script is implemented on serveral hosts - on each one DBCHANGE is differnet one.
Question:
how to put this variable (from root env) to the following command executed in the script:
su - dbadmin -c 'db2sciprt $DBCHANGE'
to have it recognized in dbadmin env. I need to run "su -" to get full dbadmin env.
Is it necessary to put this variable to dbadmin env (to profile)???
thx in advance for a tip,
rm.