title: Output of date format using Bash
body: <p>I Have a bash .sh script and I am trying to zip up yesterday's log and archive in a AWS Bucket. I need some help with getting the format of the file name correct but not having luck with it. Here is the script:</p>
  <pre><code>#!/bin/bash
  
  /jobs/copytS3.sh /var/log/appname_log_&quot;date&quot; --date=&quot;yesterday&quot; +'%Y%m%d'.log
  </code></pre>
  <p>Output shows following:</p>
  <pre class="lang-none prettyprint-override"><code>zip warning: name not matched: /var/log/appname_log_date
  </code></pre>
  <p>Not sure what I am missing. The name of the file should be: appname_log_20210120.log.</p>
  <p>I am sure it's something very basic, but I'm unable to resolve. Appreciate any help with the syntax. Thanks!</p>