title: MacOS X terminal date and variable problem
body: <p>I had this bat file in win that worked fine</p>
  
  <pre><code>set day=%date:~0,2%
  set month=%date:~3,2%
  set year=%date:~6,4%
  set filename=hello-%anno%_%mese%_%giorno%-world.txt
  my-program.exe --report-file=%filename%
  </code></pre>
  
  <p>I've passed on MACOS X and I'm trying to have the same work using a *.commad file but I can not pass the date variable in the file name argument:</p>
  
  <pre><code>my-program --report-file= date "+%Y_%m_%d"
  </code></pre>
  
  <p>doesn't work! And I need to add the words 'Hello' and 'word.txt' in the filename!</p>
  
  <p>Tried to use <code>set</code> and <code>$1</code> but couldn't hang it over</p>
  
  <pre><code>set date "+%Y_%m_%d"
  echo $1
  </code></pre>
  
  <p>echoes <code>date</code></p>
  
  <p>Any help will be appreciated!</p>