title: Creating a full directory tree at once
body: <p>I would like to create a complex directory structure in a bash script and was under the impression that the following would work:</p>
  
  <pre><code>mkdir -p tmpdir/{trunk/sources/{includes,docs},branches,tags}
  </code></pre>
  
  <p>Which would create:</p>
  
  <pre><code>          tmpdir
      ________|______
     |        |      |
  branches   tags  trunk
                     |
                   sources
                 ____|_____
                |          |
            includes     docs
  </code></pre>
  
  <p>However when I run my script I end up with:</p>
  
  <pre><code>tmpdir
     |
  trunk
  </code></pre>
  
  <p>Is there a quick and easy way to do this or am I going to have to resort to</p>
  
  <pre><code>mkdir -p tmpdir/trunk/sources/includes
  mkdir -p tmpdir/trunk/sources/docs
  mkdir -p tmpdir/branches
  mkdir -p tmpdir/tags
  </code></pre>