title: While loop to test if a file exists in bash
body: <p>I'm working on a shell script that does certain changes on a txt file only if it does  exist, however this test loop doesn't work, I wonder why?
  Thank you!</p>
  
  <pre><code>while [ ! -f /tmp/list.txt ] ;
  do
        sleep 2
  done
  </code></pre>