title: Git Bash for loop through files
body: <p>Okay, I am trying to loop through all images in a directory and do some compression on them. Here is my code.</p>
  
  <pre><code>#!/bin/bash
  for f in *.jpeg; do 
      echo "Processing $f file..";
      magick convert -quality 85% $f $f
  done
  </code></pre>
  
  <p>And here is the output from it:</p>
  
  <pre><code> $ bash compress.sh Processing *.jpeg file.. convert: unable to open
   image '*.jpeg': Invalid argument @ error/blob.c/OpenBlob/3094.
   convert: no images defined `*.jpeg' @
   error/convert.c/ConvertImageCommand/3254.
  </code></pre>
  
  <p>The <code>$f</code> reference is actually the string "*.jpeg", which is definitely not correct.</p>
  
  <p>Here is my folder structure.</p>
  
  <p><a href="https://i.stack.imgur.com/nWtcw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nWtcw.png" alt="folder structure"></a></p>