title: grep inside shell script not working
body: <p>When I run this on the command line it works:</p>
  
  <pre><code>ls | grep -v "#$"
  </code></pre>
  
  <p>But when I do <code>ls | scriptname</code> and inside the script I have:</p>
  
  <pre><code>#fileformat=unix
  #!/bin/bash
  grep -iv '#$'
  </code></pre>
  
  <p>It's not working. Why?</p>
  
  <p>[EDIT]</p>
  
  <p>the reason for the first line is explained <a href="http://www.gizmola.com/blog/archives/87-Linux-shell-scripting-bad-interpreter-No-such-file-or-directory.html" rel="nofollow">here</a>.</p>
  
  <p>besides that even if i remove the first two lines it SHOULD work. i tried the exact same on a remote Solaris account and it did work. so is it my Fedora installation?</p>