title: Using a Wildcard Match as a Command Line Argument in Bash
body: <p>I'm trying to write a Bash script to convert a bunch of files. </p>
  
  <p>Assume I have a directory <code>/path/to/my files/</code> with three text files: <code>a b.txt</code>, <code>c d.txt</code> and <code>e.txt</code> (note the spaces)</p>
  
  <p>I need to be able to call the script like this:</p>
  
  <pre><code>$ ./myscript.sh /path/to/my\ files/*.txt
  </code></pre>
  
  <p>and then loop through them in bash to process them like this:</p>
  
  <pre><code>dest='/desktop/'
  for ARG in $@; do
    /some/other/script $ARG $dest$ARG.new
  done
  </code></pre>
  
  <p>It doesn't have to work exactly like this, whatever is easiest that will yield similar results</p>