title: Invoking a script, which has an awk shebang, with parameters (vars)
body: <p>I have an awk script that I have defined thus:</p>
  
  <pre><code>#!/usr/bin/env awk
  BEGIN { if (!len) len = 1; end = start + len }
  { for (i = start; i &lt; end; i++) { print $1 } }
  </code></pre>
  
  <p>I have saved it as <code>columns</code> and <code>chmod +x</code>'d it. I want invoke it so that <code>start</code> and <code>end</code> are defined as it traverses over a file. I was thinking this should work:</p>
  
  <pre><code>cat some_file | columns -v start=2
  </code></pre>
  
  <p>But it doesn't. Help!</p>