Make exec Wait For Previous Exec To Complete
My process is based on 3 execs:
- Create schema using sqlplus
- Populate schema from xml using java app1
- Start java app2
I can't start the 2nd java app until the first one has complete as the database wont be fully populated. I use require to order them correctly but I can't get the wait part correct.
If I use unless and something like ps -ef|grep java app1 the 2nd java app wouldn't run at all.
How do I say "wait until this process is finished before running this next exec"?