title: Match exact word using grep
body: <p>I have a requirement to search for an exact word and print a line. It is working if I don't have any <code>.</code> (dots) in the line.</p>
  
  <pre><code>$cat file
  test1 ALL=ALL
  w.test1 ALL=ALL
  
  $grep -w test1 file
  test1 ALL=ALL
  w.test1 ALL=ALL
  </code></pre>
  
  <p>It is giving the second line also and I want only the lines with the exact word <code>test1</code>.</p>