Parallel execution of a program on multiple files

view full story

http://unix.stackexchange.com – I have a small script that loops through all files of a folder and executes a (usually long lasting) command. Basically it's for file in ./folder/*; do ./bin/myProgram $file > ./done/$file done (Please Ignore syntax errors, it's just pseudo code). I now wanted to run this script twice at the same time. Obviously, the execution is unnecessary if ./done/$file exists. So I changed the script to for file in ./folder/*; do [ -f ./done/$file ] || ./bin/myProgram $file >./done/$file done So basically the question is: Is it possible that both scripts (or in general more than one s (HowTos)