title: Use regex in awk command in bash script
body: <p>I'm trying to read a file of regexes, looping over them and filtering them out of another file.  I'm so close, but I'm having issues with my $regex var substitution I believe.</p>
  
  <pre><code>while read regex
  do
    awk -vRS= '!/$regex/' ORS="\n\n" $tempOne &gt; $tempTwo
    mv $tempTwo $tempOne
  done &lt; $filterFile
  </code></pre>
  
  <p>$tempOne and $tempTwo are temporary files. $filterFile is the file containing the regexes.</p>