title: Loop over files in a directory not working
body: <p>Consider this simple script:</p>
  
  <pre><code>#!/bin/bash
  DIR="$1"
  
  for f in "$DIR"; do
      if [[ "$f" == "*.txt" ]];
      then
          echo "Filename is $f"
  fi
  done
  </code></pre>
  
  <p>I want to only return files with .txt extension. Calling the script with:</p>
  
  <pre><code>./script1 /home/admin/Documents
  </code></pre>
  
  <p>Returns nothing. No error, just blank. What is wrong?</p>