title: Making the title of a directory the date in bash?
body: <p>I want to make the current date into the title of a directory in <code>/home/chris/Downloads</code> by using <code>mkdir</code> and <code>date -I</code></p>
  
  <p>I tried
      mkdir "date -I"
  that gets me a folder <i>named</i> "date -I" Without the quotes it gives the error</p>
  
  <pre><code>mkdir: invalid option -- 'I'
  </code></pre>
  
  <p>Trying to make it a variable next</p>
  
  <pre><code>date= date -I
  mkdir -p $date
  </code></pre>
  
  <p>with the <code>-p</code> option, it looked good, but upon inspection, the folder wasn't created.
  removing <code>-p</code> gets me the error</p>
  
  <pre><code>mkdir: cannot create directory `/home/chris/Downloads/': File exists
  </code></pre>
  
  <p>and even pointing it to the entire path</p>
  
  <pre><code>date= date -I
  mkdir "/home/chris/Downloads/$date"
  </code></pre>
  
  <p>gets me the same error as before</p>
  
  <p>It's not that the variable is empty, I echo'd it and the value is what I should expect, it seems to be that the value isn't substituted before the directory is created. What would be the way to get around this problem? I'm running Ubuntu 11.04 (Natty Narwhal) if that gives you any more info.</p>