Hi there,
I have a problem for which I really like your input.
I have two shell scripts (script_2a.sh and script_2b.sh) that are started by single script: script_1.sh.
Script _1.sh simply looks something like this:
Code:
<send the following file to a batch cluster computer> script_2a.sh
<send the following file to a batch cluster computer> script_2b.sh
(I send 2a and 2b off to a cluster computer that can run them in parallel, each script takes between 3 and 6 hours to run, I don’t know before hand which one finishes first)
THE PROBLEM:
When both 2a and 2b are done I automatically would like to start running script_3.sh
I’M THINKING THE SOLUTION MIGHT LOOK LIKE THIS:
1.
I could add a line to both 2a and 2b that produces:
/tmp/script_2a_done.dat
/tmp/script_2b_done.dat
2.
I can have script_1.sh (after it has started 2a and 2b) check whether /tmp/script_2a_done.dat and /tmp/script_2b_done.dat have finished after which it starts script_3.sh.
PRACTICAL QUESTIONS:
1.
Does anybody know how I can make a script that can tell if /tmp/script_2a_done.dat AND /tmp/script_2b_done.dat have been written, so I can tell it to start script_3.sh?
2.
Would anyone recommend a different solution?
Thanks a lot!
Mike