Home » Developer & Programmer » Forms » whats wrong with this code?
whats wrong with this code? [message #209443] Thu, 14 December 2006 20:35 Go to next message
verkiles
Messages: 15
Registered: November 2006
Location: Philippines
Junior Member

this statement is part of a shellscript.
when i try to run the script in a console it execute statement 1
while if i call the script using 'host' in forms it execute statement 2.
I run it using same working directory.
------- script ------------

cd /home/test
if [ -d ${archive_dir} ]
then
statement 1
else
statement 2
fi

----------------------------
why it has a two different output?

thanks,

Re: whats wrong with this code? [message #209779 is a reply to message #209443] Sun, 17 December 2006 20:21 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
You say:
when i try to run the script in a console it execute statement 1
but how are you running it as - yourself or Oracle?

As I said in http://www.orafaq.com/forum/m/208995/67467/#msg_208995 - does this work immediately after signon or do you have to run another script first? IMO 'archive_dir' is not defined when you run the 'host' command.



David
Previous Topic: Package call shows error in 10g.
Next Topic: Show valuse on Web Page
Goto Forum:
  


Current Time: Fri Dec 09 23:29:12 CST 2016

Total time taken to generate the page: 0.13102 seconds