title: how do you write a loop in a shell script for imagemagick and multiple mogrify commands
body: <p>I'm using windows 7, cygwin, and imagemagick v6.7.6 with the following mogrify command...</p>
  
  <hr>
  
  <pre><code>mogrify \
  -verbose \
  -draw 'image over 0,0 0,0 "/cygdrive/L/temp/logo.png"' \
  -gravity southeast \
  -path /cygdrive/L/temp/og-rotate-logo *.jpg \
  -adaptive-resize 1200x1200 \
  -path /cygdrive/L/temp/1200px *.jpg
  </code></pre>
  
  <hr>
  
  <p>This currently does work, however not the way I wish it did.  I think that I need some kind of loop to do what I need, but have no idea what to do.</p>
  
  <p>Basically right now the above command adds a logo to the source photo and saves it to a folder called og-rotate-logo, then after all the source images are done in the source folder it moves onto the next step and resizes all the new logo photos down to 1200x1200 and saves that photo in a folder called 1200px.  This is the result I need, however I would like to do all the commands on each photo one step at a time. Such as taking the source image, adding the logo, saving in og-rotate-logo folder, then resizing down to 1200x1200, saving in the 1200px folder and then moving on to the next image in the source folder.</p>
  
  <p>First is there a way for me to re-write my mogrify command to do this in the steps I want or is this also possible by writing some kind of shell script file to loop or something. I have absolutely no idea how to do this, would love to learn and if anyone has the time to help that would be great!  Thanks!</p>