I want to run shell scripts in parallel based on a parralelism factor that I will give and in case any process get completed at that instant another script will get triggered automatically. For example parallelism factor=3 and out of 3 scripts 1 got completed then automatically the other should get triggered as long as all get completed and there is none left. Shell script can be given inside a array and can be iterated in a loop.