title: Read glob from command line in Bash
body: <p>How do I read a glob in Bash from command line? I tried this and it only picks up the first file in the glob:</p>
  
  <pre><code>#!/bin/bash
  shopt -s nullglob
  FILES=$1
  for f in $FILES
  do
    echo "Processing $f file..."
    echo $f
  done
  </code></pre>
  
  <p>Let's say my script is script.sh. I want to call it like <code>sh script.sh /home/hss/* 4 gz</code>
  (where <code>/home/hss/*</code>, <code>4</code> and <code>gz</code> are the command line arguments). When I try the above script, it reads only the first file. Any ideas?</p>