title: Ruby and shell : get the same output with ls
body: <p>I got a folder with the following zip files :</p>
  
  <blockquote>
    <p>13162.zip  14864.zip  19573.zip  20198.zip</p>
  </blockquote>
  
  <p>In console, when i run :</p>
  
  <pre><code>cd my_folder; echo `ls *{.zip,.ZIP}`
  </code></pre>
  
  <p>I got the following output (which is perfect) :</p>
  
  <pre><code>ls: cannot access *.ZIP: No such file or directory
  13162.zip 14864.zip 19573.zip 20198.zip
  </code></pre>
  
  <p>Now when in ruby i try the same :</p>
  
  <pre><code>cmd= "cd my_folder; echo `ls {*.zip,*.ZIP}`";
  puts `#{cmd}`
  </code></pre>
  
  <p>It only display :</p>
  
  <pre><code>ls: cannot access {*.zip,*.ZIP}: No such file or directory
   =&gt; nil
  </code></pre>
  
  <p>I try this solution :
   <a href="https://stackoverflow.com/questions/690151/getting-output-of-system-calls-in-ruby">Getting output of system() calls in Ruby</a></p>
  
  <p>But it seem not work in my case.</p>
  
  <p>How can i get the same output in ruby and in shell ?</p>