title: How to pass a bash variable as value of awk parameter?
body: <p>I would like to replace a variable inside the the awk command with a bash variable.</p>
  
  <p>For example:</p>
  
  <pre><code>var="one two three"    
  echo $var | awk "{print $2}"
  </code></pre>
  
  <p>I want to replace the <code>$2</code> with the <code>var</code> variable.  I have tried <code>awk -v</code> as well as something like <code>awk "{ print ${$wordnum} }</code> to no avail.  </p>