I'm trying to setup a shell script to startup a number of programs when I run it, but I've got some issues with variables that is causing it not to work...
The bunch of lines at fault is this:
if /I "%INST%" == "OID" (
rem set PATH=%HOME%\bin;%HOME%\dcm\bin;%HOME%\opmn\bin;%PATH%
Now... %INST% has been previously set as %1, and that seems to work fine. However, sometimes the HOME and ORACLE_HOME variables don't work! (I've got the 'goto END' in there so the script doesn't actually execute.) I've added setlocal to the start of the script and endlocal to the end, as well.
Here's the output (I set echo to on):
C:\Documents and Settings\jhiggs>if /I "oid" == "OID" (
rem set PATH=\bin;\dcm\bin;\opmn\bin;D:\oracle\OWB_S\bin;D:\oracle\OWB_DT\bin;D
C:\Documents and Settings\jhiggs>endlocal
So in this case, NAME is correct, but HOME has not been set for some reason, as it's D:\oracle ... as a result, ORACLE_HOME is not set either, which causes the program to not start correctly later in the script!
Can anyone help? I'm new to shell scripting in Windows (I've done BASH shell scripting, but not Windows) I think it's got something to do with the NAME and HOME variables, but I'm not sure what...
Thanks a lot!