title: Expr and date in shell and in a variable
body: <p>So, I do:</p>
  
  <pre><code>expr `date +%d` - 1
  </code></pre>
  
  <p>In sh shell and it correctly respond <code>11</code>.</p>
  
  <p>But if I want to store that in a variable:</p>
  
  <pre><code>-sh-4.2# NUMBER=expr `date +%d` - 1
  -sh: 12: command not found
  -sh-4.2# NUMBER=$((expr `date +%d` - 1))
  -sh: expr 12 - 1: syntax error in expression (error token is "12 - 1")
  -sh-4.2# NUMBER="expr `date +%d` - 1" 
  -sh-4.2# echo $NUMBER
  expr 12 - 1
  -sh-4.2# $NUMBER
  11
  -sh-4.2# 
  </code></pre>
  
  <p>It just doesn't give me what I'm looking for. I want:</p>
  
  <blockquote>
    <p>echo $NUMBER</p>
  </blockquote>
  
  <p>to say <code>11</code>, not to evaluate to 11?</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Why does my first attempt not work?</li>
  <li>How can I make it happen?</li>
  </ol>
  
  <p>BTW, I'm limited to /bin/sh
  GNU bash, version 4.2.10(1)-release (mipsel-unknown-linux-uclibc)</p>
  
  <p><strong>EDIT:</strong>
  AND, date is very limited.
  BusyBox v1.19.4 (2013-10-30 00:56:51 PDT) multi-call binary.
  <strong>/EDIT</strong></p>
  
  <p>Although, it is bash it is limited since it is an embedded platform.</p>