I\'m trying to run some commands in paralel, in background, using bash. Here\'s what I\'m trying to do:
forloop { //this part is actually written in perl
I haven't tested this but how about
print `(touch .file1.lock; cp bigfile1 /destination; rm .file1.lock;) &`;
The parentheses mean execute in a subshell but that shouldn't hurt.