Home » Infrastructure » Unix » How to set gobal enviroment vaibles in UNIX
How to set gobal enviroment vaibles in UNIX [message #376623] Thu, 18 December 2008 01:08 Go to next message
Messages: 1
Registered: December 2008
Location: bangalore
Junior Member
Hi ,

I have one script setting envrioments varaible , calling this scripts in another script,i wnat to user thoese envrioemnt variables in parent script.

I am trying set envrioment variables with "export" comand i am unable to access thoese envrioment variables.

$ cat dm_env21
test=SVWMIG1B;export test
echo $?
echo $DM_TK_DB

I want DM_TK_DB,test varibles in test.sh scripts

$ cat test.sh
sudo su - micdev1b << EOF
cd /m61/micdev1b/work/dm/scripts
. /m61/micdev1b/work/dm/scripts/dm_env21
echo $?
#echo $DM_TK_DB
echo $test

I am runing test.sh with my user and i have sudo permission on micdev1b.

I am runing tihs test.sh script i am getting DM_TK_DB,test variable contains null values.

Could u please help me.

[Updated on: Thu, 18 December 2008 01:16]

Report message to a moderator

Re: How to set gobal enviroment vaibles in UNIX [message #376626 is a reply to message #376623] Thu, 18 December 2008 01:22 Go to previous message
Michel Cadot
Messages: 68653
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As far as I know, you can't do it through a sudo.

This question bears no connection with Oracle.
Please find a more appropriate forum.
The topic is locked.

Previous Topic: Copying (archiving) multiple files with sysdate
Next Topic: Bonnie++ Benchmark Software
Goto Forum:

Current Time: Thu May 23 08:25:53 CDT 2024