title: Shell Script with wget to get date minus 1-day
body: <p>I wrote a shell script that downloads a document.</p>
  <pre><code>cd Desktop/Reports/folder/
  
  wget http://www.mywebpage.com/data/reports/2012_04_02_data.xls
  
  echo &quot;data downloaded.&quot;
  </code></pre>
  <p>The tricky part is that the document I want to load (2012_04_02_data.xls) is dated for the previous day. So I need to download the previous days data, not the current day.</p>
  <p>My goal is to run the shell script without having to increment the calendar day each morning. Instead, the shell will take the current day and subtract one calendar day and then load that date within the url.</p>