Ksh script help

From: Joel Fisher (jfisher@wfubmc.edu)
Date: Thu Jul 01 2004 - 10:30:40 EDT


Hi!

I'm trying to write a script that can start up to a certain number of
instances of the same command(a backup cloning job) based on a given
num_command_limit that it gets from an external file. As this script
runs through a list of possibly 20 volumes or more I want to keep, for
example, 3 cloning processes running at all times until they are all
complete. My question is how do I start a background process and still
capture the exit code? I can't use 'wait', because the script is
continually looping to see if it can start another clone. My current
idea is that I would have each clone job write a single line to a
"status" file when it completes. Then I would have a loop in my main
script(after it started the final clone job) that would check that
"status" file every few minutes until it is x number of lines long.
This is definitely a hack, but I can't think of a better way to achieve
what I'm trying to do. Anyone have any suggestions? Is there another
scripting language that would handle this task better?

Thanks in Advance!

Joel
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:59 EDT