Home » Infrastructure » Unix » calling korn shell script from bash defualt shell
calling korn shell script from bash defualt shell [message #203001] Mon, 13 November 2006 08:43 Go to next message
Messages: 52
Registered: May 2006
I am trying to set some environment variables in a shell script which is written in Kshell. I am invoking this script in .profile. The problem is envirnment variables are set within the script but after exiting the script those are gone. I don't have any problem with If I have Kshell as my default shell as I can invoke my script by putting dot (. ) before the script so that envornment variables can be visible everywhere. But how can a source a kshell script in bash default shell so that my environment variables can be visiable everywhere
Re: calling korn shell script from bash defualt shell [message #203457 is a reply to message #203001] Wed, 15 November 2006 03:45 Go to previous message
Messages: 15
Registered: February 2006
Junior Member

Please try the following:

1. Create the file having the variables. Ensure to put export statement in the variable declaration within the file.
2. Ensure having proper execution permissions for the file.
3. Check ".profile" file in the HOME directory.
Note that .profile may or may not be present in the HOME directory. If present, edit the file or create a new file .profile if it is not present.
4. Include the following call to the script in ".profile"
. ./file_name

Replace "file_name" with the actual file name. Note that you have a dot followed by a space then dot and / followed by file name
5. logout and re-login

Previous Topic: Unix error: Not enough space, oracle not started
Next Topic: Cronjob Help
Goto Forum:

Current Time: Fri Dec 03 01:22:57 CST 2021