Running a queued set of commands?

Is there a way I can queue something like 800 commands in a BASH (or anything else for that matter) script?

I just basically don't want to have 800 commands pound my system at once. So far I have been just running the list (dynamically generated) through a loop, and executing every command in the background with nice in front. Only problem is that with 20 this wasn't hurting my server... at 800 I'm betting I would see CPU contention...

I'm just looking for a way to 'nicely' run a series of commands that take about 1-5 seconds a piece, executing no more than like 10 at a time (unless you have a better idea?)

Any help would be AWESOME!

  • J

Take a look at this post http://www.unix.com/shell-programming-scripting/60859-background-process-shell-scripting.html

Jean-Pierre.