Bash : Store Date Format in Variable (Self Evaluating Env Variables)
<p>I want to store formatted date in a variable and want to use that format every time. 
for example : </p>

<pre><code>    export MYDATE=$(date +%m%d%Y)
    mkdir myfolder_$MYDATE
</code></pre>

<p>But in the above case MYDATE is evaluated only once with current date. Instead I want to get the latest date each time I invoke $MYDATE (something like exec everytime). I also tried with </p>

<pre><code>     export MYDATE='$(date +%m%d%Y)'
</code></pre>

<p>but this is not useful.</p>

<p>Again, I don't want to try aliases or bash functions and looking for achieving this using bash environment variables.</p>

<p>Any suggestions or ideas ?</p>