title: Globbing/pathname expansion with colon as separator
body: <p>How can I convert a string containing glob characters such as</p>
  
  <pre><code>/var/lib/gems/*/bin
  </code></pre>
  
  <p>into a colon-separated string of filenames (i.e. PATH compatible) matching the pattern?</p>
  
  <p>i.e. <code>echo /var/lib/gems/*/bin</code> will return</p>
  
  <pre><code>/var/lib/gems/1.8/bin /var/lib/gems/1.9.1/bin
  </code></pre>
  
  <p>I want</p>
  
  <pre><code>/var/lib/gems/1.8/bin:/var/lib/gems/1.9.1/bin 
  </code></pre>
  
  <p>instead.</p>
  
  <p>The obvious approach is simply to replace the space character with ':' via <code>tr</code>, but that doesn't work if the filename itself contains the space character.</p>