Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have problem with switching env from one to another. Any way, I tried to have two Oracle version on the same server, part of it when I am trying to set it up is change env from 9i to 10G
How are you running the script? Are you using:
./scriptname
or
. ./scriptname
If you are using the first method, then your environment goes back to the original settings when the script exits. If you want to make them permanent, then putting them in your login scripts is a good choice.
I think I want to use
./script_name b/c I want to reset the env everytime I log out of the server. and every time I log in the database server I have to run ./script_name to set the env.
coudl you please give me instructions of how to do that???
If you are simply doing ./scriptname, then your environment is gone when the script exits. Do the following:
. ./scriptname
Notice the space between the periods. This will "source" the script to your current shell. When you exit the shell or logout, then the environment is gone.
They will be permanent if you put them in your login scripts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.