title: Error "syntax error near unexpected token '('" in Bash script when selecting files
body: <p>Running this script, <code>bash ./cleanup.bash</code>,</p>
  <pre><code>#!/bin/bash
  ## Going to directory-moving stuff
  rm -rf !(composer.json|.git)
  </code></pre>
  <p>Gives the error:</p>
  <blockquote>
  <p>cleanup.bash: line 10: syntax error near unexpected token '('
  cleanup.bash: line 10: 'rm -rf !(composer.json|.git)'</p>
  </blockquote>
  <p>But if I run in in the terminal directly, there aren't any problems:</p>
  <pre><code>rm -rf !(composer.json|.git)
  </code></pre>
  <p>I tried stripping out all other lines, but I still get the error.</p>
  <p>How do I enter this correctly in the Bash script?</p>
  <p>I'm on Ubuntu, and this was all done locally, not on a remote.</p>