Can someone help me look into this? I'm trying to use Imagemagick to merge two images. One is a plain text, while the other one has a nice background. I have more than 12,000 plain text and 82 background images, so I have to construct two FOR loop to be able to pick both images randomly. But unfortunately, the second loop is not working for the background images. It only picks one and merge it with all plain text instead of random. The following is how I am implementing it.
for i in $(find /home/user/png -name "*.png"); do
for o in $(find /home/user/jpg -name "*.jpg"); do
composite -gravity Center $i $o "${i%.*}.jpg";
done
done
forloops here. See mywiki.wooledge.org/DontReadLinesWithFor.