Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
This script file is flagged executable and appears to execute when run from the user's home directory (where script is stored) but the environment does not change. What is wrong with this script (RHEL 4)?
Can I ask why you think the script isn't working? One thing to keep in mind is that if you are running this script from a console, the environment variables are being changed for that console only.
Are you running the script or sourcing the script? If you run it, then any environment variable that you set is set locally, and not carried back to your initial shell. If it is sourced, then once the script finishes, all of the enviroment variables that you changed are carried back to the shell.
Can I ask why you think the script isn't working? One thing to keep in mind is that if you are running this script from a console, the environment variables are being changed for that console only.
When I echo the $ORACLE_HOME it does not reflect the value in the export statement.
Are you running the script or sourcing the script? If you run it, then any environment variable that you set is set locally, and not carried back to your initial shell. If it is sourced, then once the script finishes, all of the enviroment variables that you changed are carried back to the shell.
One other thing, your PATH statement is destroying any previously set PATH. If that is OK, you can leave it alone, otherwise put the $PATH variable along with the new additions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.