title: How to place all text from a file into the search pattern of grep?
body: <p>I am using <code>grep</code> like this:</p>
  
  <pre><code>grep '^[abcd]*$' file.txt
  </code></pre>
  
  <p>I have a file, <code>list.txt</code>, containing a list like this:</p>
  
  <pre><code>potato
  orange
  carrot
  </code></pre>
  
  <p>How can I send all of the lines from <code>list.txt</code> to inside the search pattern of <code>grep</code>, the equivalent of typing this:</p>
  
  <pre><code>grep '^[potatoorangecarrot]*$' file.txt
  </code></pre>
  
  <p>All of the lines in <code>list.txt</code> are put together and sent to <code>grep</code> as one long search.</p>
  
  <p>How can I place all of the text from a file into the search pattern of grep?</p>