[NTLUG:Discuss] Complex Script question
Jack Snodgrass
jack+ntlug at mylinuxguy.net
Fri Jun 13 11:59:33 CDT 2003
I need to do something like this:
#!/bin/bash
#2.6
ssh user at box1 "( cd /src; make clean; exit)" &
#2.8
ssh user at box2 "( cd /src; make clean; exit)" &
#linux
ssh user at box3 "( cd /src; make clean; exit)" &
# wait for the 3 tasks/pids to finish
make public
#2.6
ssh user at box1 "( cd /src; make step1; exit)" &
#2.8
ssh user at box2 "( cd /src; make step1; exit)" &
#linux
ssh user at box3 "( cd /src; make step1; exit)" &
# wait for the 3 tasks/pids to finish
make step2
etc.
I need to start multiple, simultaneos processes,
wait for them to finish, then do some local work,
then start some more, simultaneous proceses, do
some more local work, etc.
Are there any easy ways to do this? I know that I
can do something complex ( create special file, wait
for it to be removed, go onto the next step, etc ) but
I was wondering if there was a 'wait for pids to die'
type command.
Thanks - jack
More information about the Discuss
mailing list