title: How to compare two decimal numbers in bash/awk?
body: <p>I am trying to compare two decimal values but I am getting errors.
  I used </p>
  
  <pre><code>if [ "$(echo $result1 '&gt;' $result2 | bc -l)" -eq 1 ];then
  </code></pre>
  
  <p>as suggested by the other Stack Overflow thread.</p>
  
  <p>I am getting errors.</p>
  
  <p>What is the correct way to go about this?</p>