title: How to check if a string only contains digits/numerical characters
body: <p>How can I check if <code>MyVar</code> contains <em>only</em> digits with an <code>if</code> statement with BASH. By digits I am referring to 0-9.</p>
  
  <p>ie:</p>
  
  <pre><code>if [[ $MyVar does contain digits ]]  &lt;-- How can I check if MyVar is just contains numbers
  then
   do some maths with $MyVar
  else
   do a different thing
  fi
  </code></pre>