title: [-d: command not found
body: <p>As per this answer: <a href="https://stackoverflow.com/questions/19075074/unix-bash-shell-programming-if-directory-exists">Unix Bash Shell Programming if directory exists</a>, I'm trying to check if a directory exists. However, when I run this, I get <code>line 1: [-d: command not found</code>. What am I doing wrong here?</p>
  
  <pre><code>if [-d "~/.ssl"]; then
    echo '~/.ssl directory already exists'
  else
    sudo mkdir ~/.ssl/
  fi
  </code></pre>