Running scripts in parallel
I want to run several other shell scripts from this script to run them in parallel (not serially)...save the output of those scripts in different files and they should all show the date (in the saved files, not on screen)..
How can I modify the below script accordingly? #!/bin/bash sqlplus -s performance/oracle@WAMS<<eof set serveroutput on; SELECT SYSDATE FROM dual; eof |
I just heard about GNU Parallel on a podcast today. Perhaps you will find it useful:
http://www.gnu.org/s/parallel/ Here's the link to the podcast: http://hackerpublicradio.org/eps.php?id=0860 |
Can you help me modify the above shell script which I have written for parallel execution?
|
No, I'm a mere BASH beginner, but the GNU Parallel is GPL, so you could see how he did it. I do recall this is a PERL script, but it might give you some hints.
I would happily help if I could. |
Quote:
Code:
$ cat sqljobs Code:
$ cat sqljobs | parallel -j10 sql oracle://scott:tiger@ora.example.com/xe ">"{#} Adjust -j10 to run more/less jobs in parallel (-j0 = as many as possible - which may overload your Oracle server). If that is not what you want you need to give 3 examples of the jobs you want run in parallel and the corresponding file names they should be saved as. |
All times are GMT -5. The time now is 04:53 AM. |