title: Bash command to create a new file and its parent directories if necessary
body: <p>With the <code>-p</code> (<code>--parents</code>)  option, <code>mkdir</code> creates parent directories if necessary. </p>
  
  <p><code>touch</code>,  <code>vim</code> or <code>&gt;</code> can create new files in bash, but only when the parent directories exist. </p>
  
  <p><strong>How to create a new file and its parent directories if necessary, in one command?</strong> Just like what the <code>-p</code> does for <code>mkdir</code></p>