title: Using grep with two variables
body: <p>I want to use grep with two variables in a shell script</p>
  
  <pre class="lang-sh prettyprint-override"><code>var = match
  
  cat list.txt | while read word_from_list; do
      grep "$word_from_list" "$var" &gt;&gt; words_found.txt
  done
  </code></pre>
  
  <p>But grep expects to get a file as second input:</p>
  
  <p>grep: match: No such file or directory</p>
  
  <p>How can this be solved?</p>