I want to write a one liner on the terminal to send email if cpu load is high. I have this one but its send everytime its runwhile true; do  lsof -u nagios | wc -l;  b=15;  a=$(uptime | awk '{print $10}' | cut -d ',' -f1);  uptime;  if echo $a $b | awk '{exit $1>$2?0:1}'; then    echo DAL MCOM Nagios Load | mailx -s Load is greater than 15 $a hai.le@xxx;   fi;   sleep 10;doneI want to do this on the terminal
Command line to send email if CPU load is high
shell script;email