How to process multiple files parallely

Hi,

I have a requirement to process multiple files in a directory parallely.Consider the below scenario:

In a directory there are three files file1,file2 and file3.When I use for loop each file will be executed in sequence but I want to process parallely.

Any Help would be appreciated.

Thanks,
Liyakath Ali.

Do you simply want to background each process and wait until they are all completed, WARNING untested off the top of my head, on my first cup of coffee code follows

for index in $(seq 1 10); do
  pid_1=file_1&
  pid_2=file_2& 
  pid_3=file_3&
  while kill -0 $pid_1 -o  kill -0 $pid_2 -o  kill -0 $pid_3 ; do
    sleep 1;
  done
done