Multiple Instance of Unix Shell Script

Hi All,

I have a problem mentioned below.

I have a script which performs line by line operations on several files.

I have a temp_file storing the list of names of the file to be validated. Right not in while loop i validate these files one by one.

Is there anyway that i can modify my script so that it will start multiple instances of the validation script for each file name stored in the temp_file.

Say if there are 5 file names in the temp_file then 5 instances of validation script should run.

Any inputs???

Thanks in advance,
Amit

May be something like this:

 
while read file_name
do
      nohup validation_script.sh $file_name > $file_name.log 2>&1 &
done < temp_file

This will run validation script for each file in background.