We need to run 'shopt -s nullglob', otherwise the glob pattern will expand to itself if no matching files exist.
script