I have to perform some oracle database task so i have written a test scripts which open the database connection and perform a select . once it is done i want it to come out from data base to unix prompt which is not happening. the below command will be a part of shell scripts and once it is done shell will perform other task which are written after these lines of codes.
Please suggect what to do
Moderator's Comments:
Please use code tags next time for your code and data.
Last edited by zaxxon; 08-22-2012 at 10:05 AM..
Reason: code tags
You should post the shell script you have troubles with, not some (eventually irrelevant) part of it.
Even in the part you posted there are some errors (hence the initial remark):
The first line is directed to the shell, because it calls a program ("sqlplus") with some options. The second and third line are not directed against the shell, but against this called program - from where should the shell know that it has to redirect the text to this?
Here is what i suppose to happen: you start the script, it runs up to the line with "sqlplus", "sqlplus" starts and simply stands at the input prompt and the rest of the script is waiting for "sqlplus" to terminate - which never happens.
Do it the following way (it is called a "here-document"):
Heyas,
Since this question (similar) occur every now and then, and given the fact i was thinking about it just recently (1-2 weeks) anyway, i started to write something :p
The last point for motivation was... (17 Replies)
Does anyone know any websites where there are finished scripts, can be for anything
Just want to copy and paste it and manipulate into something I could use.
danke schon (0 Replies)
I'm trying to execute a script from within my java code. The execution of the script is over(it's pid is no more), but java is stuck on waitFor() method of the shell script process!. And yes, I'm reading output and error streams in 2 separate threads. Yes, they are being joined at the end(after... (0 Replies)
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
HI All,
I am running one shell script, in that script i am calling 4 scripts in the background.
abc.ksh &
efg.ksh &
xky.ksh &
mno.ksh &
please let me know, how could i find the success and failure of each script.
i Cannot use $?, because i want to run all the scripts in parellel.
... (2 Replies)
if
then
# mail -s "Import failed file does not exist" sanjay.jaiswal@xyz.com
echo "FILE does not exist"
exit 1
fi
echo "FILE EXIST"
size=-1
set $(du /export/home/oracle/nas/scott21.dmp.gz)
while
do
echo "Inside the loop"
size=$1
set $(du... (1 Reply)
could somebody tell me please how to exit a shell script:
if
then
echo "No arguments detected"
exit 1
fi
...
echo "still there" # is displayed .. :-( (4 Replies)
I have a sript which is going to trigger other 3 scripts in background simultaneously
for eg:
Main Script:(main.sh)
-----------
sh a.sh &
sh b.sh &
sh c.sh &
How to catch the exit status and store it in a variable for all those three scripts in main script. Is there any other way of... (4 Replies)