title: BASH check if today is 1st day of month
body: <p>I have a bash script and I need it to fulfill some conditions if it is 1st day of month.<br>
  I have written this code<br>
  <br></p>
  
  <pre><code>ifStart=`date '+%d'`
  if [$ifStart == 01]
  then
  test=`/bin/date --date='1 day ago' +'%Y-%m'`
  echo $test
  fi
  </code></pre>
  
  <p>I expect it to show 2013-03 today, but I get an errormessage:<br>
  Line 2 command not found.</p>
  
  <pre><code>test=`/bin/date --date='1 day ago' +'%Y-%m'`
  </code></pre>
  
  <p>this part works well without if.<br>
  Any suggestions?</p>