title: Pass parameter to an awk script file
body: <p>If I want to pass a parameter to an awk script file, how can I do that ?</p>
  
  <pre><code>#!/usr/bin/awk -f
  
  {print $1}
  </code></pre>
  
  <p>Here I want to print the first argument passed to the script from the shell, like:</p>
  
  <pre><code>bash-prompt&gt; echo "test" | ./myawkscript.awk hello
  bash-prompt&gt; hello
  </code></pre>