title: bash - Test if directory contains files ending on .suite
body: <p>I'm currently writing a bash script for executing test suites. Besides passing the suites directly to this script, like</p>
  
  <pre><code>./bash-specs test.suite
  </code></pre>
  
  <p>it should also be able to execute all scripts in a given directory if no suite is passed to it, like so</p>
  
  <pre><code>./bash-specs # executes all tests in the directory, namely test.suite
  </code></pre>
  
  <p>This is implemented like this</p>
  
  <pre><code>(($# == 0)) &amp;&amp; set -- *.suite
  </code></pre>
  
  <p>So, if no suite is passed, all the files ending on .suite are executed. This works fine but fails if the directory contains no such files.</p>
  
  <p>That means I will also need a check to test if there actually are files with that ending.
  How would I do this in bash?</p>
  
  <p>I thought a test like </p>
  
  <pre><code>[[ -f *.suite ]]
  </code></pre>
  
  <p>should work but it seems to fail when there are more than one file in the directory.</p>