Hi all:
I'm writing a korn shell script that runs on one box and connects to multiple (100+) boxes:
################ SCRIPT: ########################
#!/bin/ksh
for srv in `cat server_list|grep -v '#'`
do
echo "starting $srv"
ssh $srv "./extract_script"
scp $srv:/scripts/extract_script_output extract_script_output_$srv
echo "finished $srv"
done
################ SCRIPT: ########################
(the actual script does a lot more, but this is the basic idea)
Is it possible in ksh to spawn the for loop statements into other processes so i can be running the commands on all the servers at the same time w/o having to wait for each server to finish?
I could schedule the extract_script to run on each server individually, but then i have to maintain 100+ versions/schedules. This would be the easiest way for maintaince...
thx in advance
