title: Bash check shows file exists for non-existent files?
body: <p>Run the following in bash:</p>
  
  <pre><code>   stuff=`rpm -ql &lt;some package&gt; | grep dasdasdfd`
  </code></pre>
  
  <p>(non existent file in package, exit code = 1, stdout is empty)</p>
  
  <pre><code>  if [ -f $stuff ]; then echo "whaaat"; fi
  </code></pre>
  
  <p>Above command checks if file exists... but:</p>
  
  <pre><code>file $stuff
  </code></pre>
  
  <p>Just prints usage info for file... and</p>
  
  <pre><code>stat $stuff
  </code></pre>
  
  <p>Missing operand... </p>
  
  <p>Can someone please explain why? Is this a bug? Am I doing something wrong? I just want to make sure that a file that's in the package is present on fs</p>