Wednesday, March 05, 2008

Oracle Environment shell script on Ubuntu

I install Oracle 10g Express edition in my Ubuntu machine from oracle-xe_10.2.0.1-1.0_i386.deb
Before that you need to install a library : libaio1 .

To run sqlplus you need to run a shell script first to update your environment variables. The script is at /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/ .
But I got this error line twice each time I run the script.

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/ 114: [[: not found

You need to edit the /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/
at these lines :

if [[ -n "$LC_ALL" ]]; then
elif [[ -n "$LANG" ]]; then

Edit [[ to [ and ]] to ] , so it will be like these :

if [ -n "$LC_ALL" ]; then
elif [ -n "$LANG" ]; then

Actually I don't know is there any side effect but as long as I use it there is no problem with my revised .
So, if you have any better solusion please comment this post. Thank you.


Ownah said...

People should read this.

Anonymous said...

it works !! :P thanks a lot