title: ignore ( or do not print ) find warning bash
body: <p>I wrote a bash script that search text file in the current directory and all subdirectories.</p>
  <p>When I pass  <code>~/file.txt</code> as argument the command</p>
  <pre><code>$(find . -name &quot;$i&quot;)
  </code></pre>
  <p>it prints to the terminal the warning:</p>
  <blockquote>
  <p>find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?</p>
  </blockquote>
  <p>Is there an option to ignore that command and not print it?</p>