Hi all,
This is a stupid question and maybe a bit too easy....
I have installed Linux RedHat 7.1 workstation recently on my system. In Windows NT, we can write a .cmd file, set some environment variables, and execute that file on the dos prompt so that the environment of the current window is set. For example, the following are the contents of wlstart.cmd file:
set PATH=c:\jdk1.3\bin;c:\weblogic\bin;%PATH%
set CLASSPATH=;%CLASSPATH%
set CLASSPATH=c:\student;%CLASSPATH%
set CLASSPATH=c:\weblogic\classes\boot;%CLASSPATH%
set CLASSPATH=c:\weblogic\eval\cloudscape\lib\cloudscape.jar;%CLASSPATH%
set WEBLOGICCLASSPATH=c:\weblogic\classes
set WEBLOGICCLASSPATH=c:\weblogic\license;%WEBLOGICCLASSPATH%
set WEBLOGICCLASSPATH=c:\weblogic\lib\weblogicaux.jar;%WEBLOGICCLASSPATH%
set WEBLOGICCLASSPATH=c:\weblogic\myserver\serverclasses;%WEBLOGICCLASSPATH%
java -cp %classpath% -Dweblogic.class.path=%WEBLOGICCLASSPATH% -Dweblogic.system.home=c:\weblogic -Dweblogic.home=c:\weblogic -Djava.security.policy==c:\weblogic\weblogic.policy weblogic.Server
Now, my question is, how to achieve a similar thing in Linux. I know it is done thru' shell scripts. I wrote a script and ran it using
bash first.sh
command
The script is written below:
#! /bin/bash
ORION_HOME=/home/sanjeev
export ORION_HOME
when i checked the environment variable ORION_HOME using "set" command, I did not see the variable set.
I have tried to read thru' books but no clue.....
Please help me...
I have tried to log in as Super User also, but even that does not work.
Please help....
****Another twist to the situation***********************
..if I add the command "set" as the last line of the above script, like:
#! /bin/bash
ORION_HOME=/home/sanjeev
export ORION_HOME
set
Then it shows that for the period of execution of the shell, the ORION_HOME IS SET. Once the shell scripts exits, the environment does not reflect this???
Regards
Sanjeev