title: How to use Posix Extended Regular Expressions in the shebang of sed interpreter script?
body: <p>I've written a sed interpreter script:</p>
  
  <pre><code>#!/usr/bin/sed -E -f
  s/ +/_/g
  s/[.':]//g
  s/&amp;/and/g
  </code></pre>
  
  <p>However, when I run it:</p>
  
  <pre><code>$ echo "Bob Dylan" | shscrub.sed
  sed: unknown option --  
  usage: sed [-aEnru] command [file ...]
         sed [-aEnru] [-e command] [-f command_file] [file ...]
  </code></pre>
  
  <p>I need the -E option because I'm using the Extended Regular Expression syntax '+'.</p>
  
  <p>Any ideas what I'm doing wrong?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>A workaround:</p>
  
  <pre><code>#!/usr/bin/sed -f
  s/ \{1,\}/_/g
  s/[.':]//g
  s/&amp;/and/g
  </code></pre>
  
  <p>But, I'd still like to know how I can pass two parameters in the shebang (#!) line.</p>