Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 bWhat 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.

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...

![]() |
korn shell help
|
Need help extracting data...
|

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