title: Arithmetic comparison in a shell
body: <p>i want to compare two number values in a shell script (sh) but it doesn`t work:</p>
  
  <pre><code>#!/bin/sh
  let a=30
  let b=100
  let x=$a-$b
  echo $a $b $x
  [ $a &lt; $b ] &amp;&amp; { echo ok; }
  </code></pre>
  
  <p>That outputs:</p>
  
  <pre><code>30 100 -70
  ./x: line 6: 100: No such file or directory
  </code></pre>