How to control execution of programs in a shell script.
Dear LinuxQuestions,
Do you know how to write a shell script that executes say 4 instances of the same program in different directories at the same time, and once ONE instance completes it executes a new instance of that program in a new directory, and so on, until 100 instances have been executed, each in their own directory. Cheers, Chrisantha |
Maybe if you gave us an example we may be able to assist?
|
I'm basically wanting to run several versions of a C++ genetic algorithm in Mac OS X. I want to run a batch of these programs on a server that has 5 nodes, and I want to start a new program each time one of the previous programs ends.
It seems this must consist of 3 parts. 1. Regular checking to see if a program has ended 2. Starting a program conditional upon this. 3. Making sure it starts in its own directory. Basically, I have not done any sophisticated shell programming before. Cheers, Chrisantha |
Quote:
Code:
#!/bin/sh Code:
#!/bin/sh |
Quote:
they can be horrendous. |
Thanks
Thank you I shall examine this and learn.
Chrisantha |
All times are GMT -5. The time now is 03:27 AM. |