title: How do I test if a variable is a number in Bash?
body: <p>I just can't figure out how do I make sure an argument passed to my script is a number or not.</p>
  
  <p>All I want to do is something like this:</p>
  
  <pre><code>test *isnumber* $1 &amp;&amp; VAR=$1 || echo "need a number"
  </code></pre>
  
  <p>Any help?</p>