Simultaneously execute two queries on a shell script
- by Alex
I have a shell script in which I have to execute two queries (on different databases), spool their results to text files and finally call a c++ program that processes the information on those text files. Something like this:
sqlplus user1/pw1@database1 @query1.sql
sqlplus user2/pw2@database2 @query2.sql
./process_db_output
Both queries take some time to execute. One of them can take up to 10 minutes, while the other one is usually faster. What I want to do is execute them simultaneously and when both are done, call the processing utility.
Any suggestion on how to do so?