looking for a simple way to organize envs on our unix box...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting looking for a simple way to organize envs on our unix box...
# 1  
Old 08-25-2008
looking for a simple way to organize envs on our unix box...

would like to standardize how we set envs on our unix box, so I thought a menu would be a great way to accomplish this.

The problem I'm experiencing, is the value is set...but ONLY during the time the menu is initiated.

please see below:
> /home/is/bin/r12MENU.sh
**================================================================**
** to Set your environment, select one of the following: **
** 1.) DEVSID - Development Environments **
** 2.) UATSID - CRP2/UAT Environments **
** 3.) GLDSID - GOLD Environments **
** 4.) APPSSID - PROD Environments **
** e.) EXIT this menu **
**================================================================**


** Enter your response (1, 2, 3, 4 or [e]): 1

**=========================================================**
** You have chosen DEVSID - Development Environments **
** **
** your environment will now be set... **
**=========================================================**
devsid



the devsid you see above is an ECHO within the menu script on oracle_sid.
so I know it's setting the correct env, but only durring the running of the script.

If I perform an echo from command line...it's set to whatever was defined before running the menu.

If I run the individual scripts from CL, it sets my env correctly...so it's not the individual env scripts.

any assistance would be appreciated,
manny
# 2  
Old 08-25-2008
Processes do not inherit environment variables from their childs, try to start your script(s) in the current environment with:

Code:
. /dirname/scriptname

Regards
# 3  
Old 08-25-2008
sourcing env scripts and menu's is the solution...
thanks Franklin52 Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Transferring the file from one UNIX box to another UNIX box

Hi Folks, I am using winscp to graphiclly move the files from one unix box to another unix box , let say one unix box crediantials is (These are dummy crediantials) xxx -->username yyy -->password and another unix box name is RRR -->username TTT -->password NOW i need to... (4 Replies)
Discussion started by: punpun66
4 Replies

2. Solaris

Compile SSCEP (Simple SCEP client for Unix) on Solaris 10 box

Hi folks I am trying to compile SSCEP (Simple SCEP client for Unix) on Solaris 10 box. SSCEP - Simple SCEP client for Unix The errror is "ld: fatal: Symbol referencing errors. No output written to" $ make gcc -Wall -O -lcrypto -o sscep sscep.o init.o net.o sceputils.o pkcs7.o ias.o... (2 Replies)
Discussion started by: slashdotweenie
2 Replies

3. Shell Programming and Scripting

Need assistance with simple shell script to organize files. [Code attached]

I need some help with this shell script for class. All it does is organize your files. It works, but in the log file, it needs to show the new filepaths of the moved files. Heres my log of my output: Starting to organize... movie2.wmv --> movie3.mov --> movie1.mpg --> song1.mp3 --> ... (3 Replies)
Discussion started by: ryandamartini
3 Replies

4. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

5. Shell Programming and Scripting

how to compare all files in one unix box has been to copied to another unix box

Hi our unix admin has copied all files from one unix box to new unix box. We just need to confirm that all the file systems are copied properly. How to validate. (9 Replies)
Discussion started by: sravanreddym
9 Replies

6. UNIX for Dummies Questions & Answers

I need an scp command from a unix box to a windows box.

scp file="myfile.txt" todir="user@somehost:(M:drive:/somepath/)"/ Not sure I need it to go to a specific drive on the windows box (1 Reply)
Discussion started by: xgringo
1 Replies

7. Shell Programming and Scripting

Moving files from Unix box to a windows box

Hi All, I need a little help .I want to transfer a file from unix box to a windows box,but the problem i'm facing is that in windows box FTP is not enabled and currently it is nearly impssible to change setting on windows box,i can not use the ftp method ,in my shell script to transfer the file.... (2 Replies)
Discussion started by: Preet
2 Replies

8. UNIX for Dummies Questions & Answers

Running UNIX commands remotely in Windows box from Unix box – avoid entering password

I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked. Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies

9. UNIX for Advanced & Expert Users

How to FTP a file generated at UNIX Box to NT Box

Hi all, I am generating a file on the Unix machine , now i want to FTP the same file to the NT machine. how can i do that and the application currently upon which i am working is a JAVA based application. I need your help. regards Ruchir (2 Replies)
Discussion started by: Ruchir
2 Replies

10. UNIX for Advanced & Expert Users

VPN client (windows Box),and Server (Unix Box)

If I want to access unix box via VPN tunnel,from windows box. What sould I configure on the windows client PC, and what should I enable on the Unix Server box ? I am using Solaris V10 intel platform, and I am using windows XP, and 2003 for client (0 Replies)
Discussion started by: zillah
0 Replies
Login or Register to Ask a Question