Computing.Net > Forums > Unix > Waiting problem - KSH script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Waiting problem - KSH script

Reply to Message Icon

Name: lankrypt0
Date: June 1, 2007 at 07:45:40 Pacific
OS: KSH
CPU/Ram: N/a
Product: N/a
Comment:

I am writing a KSH script with an SQL query in the middle, and then finished with some clean up processes. The problem I am running into is that sometimes the SQL server becomes a bit lagged so the whole query doesnt finish. As an example, I have the script below.

#!/usr/bin/ksh
print a
sqlplus TNAME/example@ABCD @test.sql
print b

What I would like to happen is have the script print a, then complete the whole sqlplus query, THEN print b. The problem I have now is that it will print a, start the query, then immediately print b. I have tried the wait command with a 5 minute (300 seconds) wait, but that doesnt always work.

Any help would be greatly appreciated.




Sponsored Link
Ads by Google

Response Number 1
Name: fpmurphy
Date: June 3, 2007 at 10:25:34 Pacific
Reply:

One way is to use a named pipe.

Rather than write an example of a named pipe script, I googled the Internet and came across the
following example:

http://www.ixora.com.au/q+a/0111/08...



0
Reply to Message Icon

Related Posts

See More


korn shell help Need help extracting data...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Waiting problem - KSH script

Need Help With KSH Script www.computing.net/answers/unix/need-help-with-ksh-script/6747.html

ksh script www.computing.net/answers/unix/ksh-script/6748.html

Test ssh connection from KSH script www.computing.net/answers/unix/test-ssh-connection-from-ksh-script/6950.html