title: Awk greater than less than but within a set range
body: <p>I have a script that basically evaulates 2 decimal numbers.</p>
  
  <pre><code>if (( $(echo "$p $q" | awk '{ print ($1 &lt; $2)}') )); then
     echo "Evaluation: Acceptable!"
  </code></pre>
  
  <p>q is a decimal or number from user input.<br>
  p is a calculated figure.</p>
  
  <p><p>Consequently, if p=1, and q=2, then the outcome is Acceptable. </p>
  
  <p><p>Question#1<br>
  How do we evaulate it to be UNacceptable if the calculated p is -150, while q=2. Basically, if p is less than 0 or a negative value, the outcome should be UNacceptable.</p>
  
  <p><P>Question#2<br>
  q is a range: -q &lt; 0 &lt; q <br>
  Example: User input q=0.01<br>
  Acceptable range: -0.01 to 0.01<br>
  If p is within this range, then it's acceptable, else UNacceptable.</p>
  
  <p><p>Any ideas?</p>