title: Bash - command substitution with variables
body: <p>I am still new to bash, so I was hoping someone more experience than me would be able to help me. 
  I have the following bit of code: </p>
  
  <pre><code>DAY1=$(date +"%d/%b/%Y")
  DAY2=$(date --date="-1 days" +"%d/%b/%Y")
  ...
  DAY14=$(date --date="-13 days" +"%d/%b/%Y")
  COUNT=0
  </code></pre>
  
  <p>What I would like to accomplish is to refer to the substituted commands as something like</p>
  
  <pre><code>$DAY($COUNT+1)
  </code></pre>
  
  <p>to produce variables from $DAY1 to $DAY14. That bit of code obviously doesn't work, but I needed some ideas on how to make this happen. I use a loop that increments the COUNT variable like so:</p>
  
  <pre><code>for i in $(seq 1 14); do
    let COUNT+=1
  done
  </code></pre>