title: Prevent short-circuiting in Bash
body: <p>I want to</p>
  <ol>
  <li>generate a list of matching files</li>
  <li>know if at least one of the patterns matched</li>
  </ol>
  <p>The following will not work if there are any pdf files because then the first <code>compgen</code> will return <code>true</code> and the second <code>compgen</code> will not be executed.</p>
  <pre><code>{ compgen -G &quot;*.pdf&quot; || compgen -G &quot;*.txt&quot;; }
  </code></pre>
  <p>Is there a way to prevent short-circuiting?</p>