title: Loop through files in Mac terminal
body: <p>I am trying to write a simple loop that will loop through the files the current directory and just print the file names.</p>
  
  <p>I tried that:</p>
  
  <pre><code>#!/bin/bash    
  FILES=/Users/nick/Desktop/*.jpg
      for f in $FILES
      do
          echo $f
      done
  </code></pre>
  
  <p>but it didn't work. Running ./script it just printed "/Users/nick/Desktop/*.jpg". No errors</p>
  
  <p>I am running this on a MacBook Pro 10.10.4</p>
  
  <p>Thanks </p>