title: Use bash variable in AWK expression
body: <p>I tried the following snippet in a shell script but <code>awk</code> didn't find <code>$REF</code></p>
  
  <pre class="lang-sh prettyprint-override"><code>REF=SEARCH_TEXT
  echo "some text" | awk '/$REF/{print $2}'
  </code></pre>