how to verify sqlplus not installed on solaris


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to verify sqlplus not installed on solaris
# 1  
Old 09-01-2008
how to verify sqlplus not installed on solaris

i want to write shell script that exit by displaying error if sqlplus is not installed.

The platform is oracle10g on solaris sparc.

I tried the which sqlplus command, but it returns errorcode 0 even sqlplus is not installed.

Kindly help?
# 2  
Old 09-01-2008
Hi! Can you post your script here?
# 3  
Old 09-01-2008
It is below:

which $ORACLE_HOME/bin/sqlplus > /dev/null 2> /dev/null

if [ $? != 0 ]; then
echo "ERROR: Either sqlplus is not available on this machine or ORACLE_HOME is configured wrongly in install.sh"
exit 1
fi
# 4  
Old 09-01-2008
filename="$ORACLE_HOME/bin/sqlplus"
if [ -s $filename ]
then
echo "YES. sqlplus available"
else
echo "NO sqlplus not avail"
fi
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How-to verify if my package installed successfully

Can you please let me know how can i verify /check inside the script if the below to package installation commands are successful or if they failed for any reasons? 1. pkgadd -a $INSTP/install/dadmin -d $INSTP/install/apachesrv.pkg 2. pkgadd -a $INSTP/install/dadmin -d... (6 Replies)
Discussion started by: mohtashims
6 Replies

2. Solaris

Solaris 10 installed in vmware

I had no idea where I should post before i posting this . I have googled many many articles about how I share my host win 7 file into my vmware 9 solaris 10 system but what the solutions I found are all not work for me. for example VMware Communities: file sharing - Windows XP guest -...... (3 Replies)
Discussion started by: SSUUser
3 Replies

3. Red Hat

How to verify the current NIC driver version installed in RHEL5.3??

Guys, Can you help me how to verify the current installed NIC driver version in RHEL5.3? Thanks.:D (1 Reply)
Discussion started by: shtobias
1 Replies

4. Solaris

Unable to login using ssh,telnet onto my solaris machine with solaris 10 installed

Hi, I am unable to login into my terminal hosting Solaris 10 and get the below error message "Server refused to allocate pty ld.so.1: sh: fatal: libc.so.1: open failed: No such file or directory " Is there anyways i can get into my machine and what kind of changes are required to be... (7 Replies)
Discussion started by: sankasu
7 Replies

5. Solaris

How to verify Sun Solaris installation

Does anybody have an idea, how to verify Sun Solaris installation? (3 Replies)
Discussion started by: agarwal
3 Replies

6. HP-UX

Verify Hardware installed HP-UX11

Hi - Basic question from newbie I need to find out how to verify hardware installed on HPUX server. Mid-range server - as in i need to prove to customer that a specific cpu is installed, so much memory is installed, etc. PLEASE HELP. TA (16 Replies)
Discussion started by: hoffies
16 Replies

7. UNIX for Dummies Questions & Answers

Verify Hardware installed on HP-UX 11

Hi - Basic question from newbie I need to find out how to verify hardware installed on HPUX server. Mid-range server - as in i need to prove to customer that a specific cpu is installed, so much memory is installed, etc. PLEASE HELP. TA (1 Reply)
Discussion started by: hoffies
1 Replies

8. Solaris

just installed Solaris 10 x86

Hi, I've just installed solaris 10 on one of my old PC's (a 1ghz 256M PC). I think the installation worked ok but when I reboot it I can only login via the command line console and not the nice CDE interface. Has anyone seen this before? Its probable something simple I'm doing wrong. ... (4 Replies)
Discussion started by: fishman2001
4 Replies

9. UNIX for Dummies Questions & Answers

Just installed Solaris 8 but....

Hello again, Well i went ahead with my solaris installation tonight (on my pc) and it all appeared to work ok. Unfortunately, i am unable to use the system yet because it gives me this horrible message straight after it boots up: "The X-server can not be started on display :0..." It... (4 Replies)
Discussion started by: timresh
4 Replies

10. UNIX for Dummies Questions & Answers

Solaris (verify 64 or 32 bit

Hello !! Does anyone know how can I verify if my Solaris is 32 or 64 bit ?? Thank you ! Witt (3 Replies)
Discussion started by: witt
3 Replies
Login or Register to Ask a Question