title: `if [-e file.txt]` not working in bash
body: <p>I'm trying to check if a file exists using bash. This is my code</p>
  
  <pre><code>if [-e file.txt]; then
    echo "file exists"
  else
    echo "file doesn't exist"
  fi
  </code></pre>
  
  <p>But when I run it I get:</p>
  
  <pre><code>./test.sh: line 3: [-e: command not found
  </code></pre>
  
  <p>What am I doing wrong?</p>