title: Bash file existence checking missing ]
body: <p>I am attempting a simple file existence check in my bash script:</p>
  
  <pre><code>FILE_TO_CHECK=/home/username/path/to/file
  
  if [ ! -f $FILE_TO_CHECK]; #line 9 in actual script
  then
      echo File not found.
  fi
  </code></pre>
  
  <p>Seems simple enough to me, but I'm getting the following error and I don't know why:</p>
  
  <pre><code>/path/to/script: line 9: [: missing `]'
  </code></pre>
  
  <p>I'm not exactly a bash expert, but I was pretty sure a backtick is not necessary in this context. What gives?</p>