[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to refrain only use certain number of processors



lina <lina.lastname@gmail.com> writes:

> I have a script like
>
> #!/bin/bash
>
> for i in {0..108}
> do
>
> some job will run for mins &
>
> done
>
> Here I used & for some kinda of parallel.
> but there is a problem,
>
> I wished at most it only run 8 jobs simultantly, no more than 8, once
> finished, a new job can continue,

If you can use a Makefile instead of your script to get the job done,
you could use make -j8 instead.


Reply to: