title: In Bash, how do I interpolate $(...) in a string?
body: <p>I am attempting to write a Bash script that performs a mysqldump on my live site's database, then adds and commits the dump to a Git repository.  Here is what I have so far (stored in a .sh file which is called by a <a href="https://en.wikipedia.org/wiki/Cron#Overview" rel="noreferrer">crontab</a> entry):</p>
  <pre><code>/usr/bin/mysqldump --skip-comments --skip-dump-date -u [user] -p[pass] database | gzip &gt; /var/www/site/backup/database.sql.gz
  cd var/www/site/backup &amp;&amp; git add *
  cd var/www/site/backup &amp;&amp; git commit -m 'Database $(date +%a %H:%M %h %d %Y)'
  </code></pre>
  <p>My crontab entry looks like this:</p>
  <pre><code>0,20,40 8-22 * * * /var/www/site/backup/script.sh
  </code></pre>
  <p>I can see that this script does dump the database, but does not add or commit the file to Git. Is there something that I am missing?</p>
  <hr/>
  <p>Later I made the following changes and the commit works:</p>
  <pre><code>cd /var/www/site/backup &amp;&amp; /usr/bin/git add *
  cd /var/www/site/backup &amp;&amp; /usr/bin/git commit -m 'Database $(date +%a %H:%M %h %d %Y)'
  </code></pre>
  <p>However, the date does not get calculated.</p>
  <hr/>
  <p>Latest revisions, including (most of) the recommendations:</p>
  <pre><code>/usr/bin/mysqldump --skip-comments --skip-dump-date -u [user] -p[pass] database &gt; /var/www/site/backup/database.sql
  cd var/www/site/backup
  /usr/bin/git add *
  /usr/bin/git commit -m &quot;Internal Forms Live Database Dump Stored $(date '+%a %H:%M %h %d %Y')&quot;
  </code></pre>