Parallel execution of command inside file

Hi all, I have the requirement to generate the file containing following command

eval /path/ dsjob -logdetail projectname JOBNAME /path/

  1. The file contains the above command say about 150 times i,e only the JOBNAME changes in every command
  2. The commands must be written in such a way that it has to run in parallel.
  3. I need to call this file from the script.

so what is the way to write the command inside a file.

Hi, use & for background operation and wait to wait for the background jobs to finish..

try some thigh like this

#!/bin/bash

for JOBNAME in [1..150]
do
eval /path/ dsjob -logdetail projectname Job_$JOBNAME /path/ &
done

Here Job_1 ... Job_150 will be name of your job.