title: Relational operators for floating point values in Unix Shell Scripting
body: <p>I'm writing a shell script to find out if any process is taking too much CPU utilization, then the script will send out a mail to the support team.</p>
  
  <p>I have threshold limit as 25, and taking CPU Usage as: </p>
  
  <pre><code>cpuUsage=`ps -eo pcpu,pid,args | sort -k 1 -nr  | head -1`
  </code></pre>
  
  <p>Iterating over it to find out cpuUsage</p>
  
  <pre><code>for count in $cpuUsage
  do
        CPUusageCount=$count
  done
  </code></pre>
  
  <p>Then Checking <code>CPUUsageCount</code> with threshold limit as like this:</p>
  
  <pre><code>if [ $CPUusageCount -gt $THRESHOLD_LIMIT ];
  then 
   #Sending mail to Support group
  fi
  </code></pre>
  
  <p>Here I'm facing an error message: <code>Integer expression expected at  if [ $CPUusageCount</code>. Can't we use <code>-gt</code> to validate floating point numbers? Please help me how to achieve it?</p>