title: mkdir -p vs if [[ ! -d dirname ]]
body: <p>Is there any reason to use  </p>
  
  <pre><code>if [[ ! -d dirname ]]; then mkdir dirname; fi
  </code></pre>
  
  <p>instead of just  </p>
  
  <pre><code>mkdir -p dirname
  </code></pre>