title: How can I delete a file only if it exists?
body: <p>I have a shell script and I want to add a line or two where it would remove a log file only if it exists. Currently my script simply does:</p>
  
  <pre><code>rm filename.log
  </code></pre>
  
  <p>However if the filename doesn't exist I get a message saying filename.log does not exist, cannot remove. This makes sense but I don't want to keep seeing that every time I run the script. Is there a smarter way with an IF statement I can get this done?</p>