title: shell script to read contain from file and grep on other file
body: <p>I am working on shell, I want to write one liner which will read the file contents of file <strong>A</strong> and execute <code>grep</code> command on file <strong>B</strong>.</p>
  
  <p>for example, suppose there are two file </p>
  
  <p><strong>dataFile.log</strong>  which have following value</p>
  
  <p><code>abc</code></p>
  
  <p><code>xyz</code></p>
  
  <p><code>...</code> and so on</p>
  
  <p>now read abc and grep on <strong>searchFile.log</strong> like <code>grep abc searchFile.log</code></p>
  
  <p>I have shell script for the same but want one liner for it</p>
  
  <pre><code>for i in "cat dataFile.log" do grep $i searchFile.log done;
  </code></pre>