Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

scripts not running via terminal in OEL5

9 views
Skip to first unread message

Kgaur

unread,
Nov 5, 2013, 11:24:42 PM11/5/13
to
HI,

I might be out of place posting OEL issue on a redhat group, but i couldnt find the relevant group on OEL.

It would be great if anybody could help me understand the issue.

I just installed OEL5 on vmware WS9 on my windows xp machine.
Quite strangely, I am not able to run any scritps via the terminal.

I just created a script "setenv.sh" to set environment for ORACLE DB (which ideally should have gone in one of .*profile files, which aren't running either), and changed permissions to 777.

Then I ran the the file as ./setenv.sh

Here are the contents of the file.
---------------
#! /bin/bash

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=orcl
---------------

All help is greatly appreciated.

Regards

Jan Gerrit Kootstra

unread,
Nov 6, 2013, 11:41:40 AM11/6/13
to
Op 06-11-13 05:24, Kgaur schreef:
Hi


No problem posting here.

What is the issue?

Post error messages or expected and
found results.
For there seems nothing wrong with the
script.

I guess the result you expect is not
what you get.

You run the script instead of sourcing
the script.

source ./setenv.sh

or

. ./setenv.sh

will set the variables for the whole
session

where as

./setenv.sh

will only set the variables during
the run of your script.

This can be verified by putting an

echo $ORACLE_SID at the end of the
script and run the echo after the
script ended


Kind regards,


Jan Gerrit Kootstra
0 new messages