Loop to create copies
<p>I'm making a bash script on an OSX computer at work to create a kit of prints.
The script works fine, as it make the correct amount of copies of the files to the correct destination.</p>

<p>However the destination, a 'print rip', serves the files with a 'first in - first out' principle. My script seems to be making the copies of each file by the file. I want it to make a copy of the entire 'kit' of files, before proceeding to the next copy...</p>

<p>The order the script makes the copies now are:  </p>

<pre><code>File1-Copy1.jpg
File1-Copy2.jpg
File2-Copy1.jpg
File2-Copy2.jpg  
</code></pre>

<p>The order I want the script to make the copies are:  </p>

<pre><code>File1-Copy1.jpg
File2-Copy1.jpg
File1-Copy2.jpg
File2-Copy2.jpg
</code></pre>

<p>My current script looks like this:  </p>

<pre><code>for filename in $(find $scriptdir -iname '*-F_*' -o -name '*.jpg' -print)
do
   for f in $(eval echo "{1..$copies}"); do 
       cp /$scriptdir/FILER/${filename##*/} $printdir"/"$PrintColor"_"$f"_"${filename##*/}; 
   done
done
</code></pre>

<p>So instead of copying each file X amount of times, before proceeding to the next file, I need the script to copy all the files, before proceeding to the next 'set' of files...<br>
<br>
Does anyone have an idea of how to make it work?</p>