I have loop in shell script and it takes time process only a few files in the list. How do I push the process in the background and select the next file while the first file is still being processed?
for newfile in `ls new*`
do
time consuming process &
done
I tried & at the end of the command after > /dev/null 2>&1 but it does not seem to work.