title: How to test if string exists in file with Bash?
body: <p>I have a file that contains directory names:</p>
  
  <p><code>my_list.txt</code> :</p>
  
  <pre><code>/tmp
  /var/tmp
  </code></pre>
  
  <p>I'd like to check in Bash before I'll add a directory name if that name already exists in the file.</p>