title: How to match a string with a space in the end to lines in a file using bash?
body: <p>So, I am trying to match a string to some lines in a file. Now, the lines in the files are in the format:</p>
  
  <pre><code>peeyush (#$#@$)
  peeyush-gupta ($%%&amp;%)
  </code></pre>
  
  <p>Now, my problem is when I try to search 'peeyush', I should get only first line as the output. Till now, I have been doing this:</p>
  
  <pre><code>line='peeyush'
  grep $line test.txt
  </code></pre>
  
  <p>Now, the search string would definitely come in a variable as this thing is going in loop. So, this gives me both the string as result. I want to match the string 'peeyush ' (with a space), while it's matching without spaces.</p>