|

楼主 |
发表于 2007-5-10 08:49:25
|
显示全部楼层
#!/bin/bash
pid=`top -n 1 -b|grep ca|awk '{print $1}'`;
echo $pid
cpu=`top -n 1 -b|grep ca|awk '{print $9}'`;
echo $cpu
if [ $cpu -lt 5 ]
then
echo "$cpu is less than 5"
kill $pid
sh /bin/ca
fi
我需要方法,我现在在小于等于这里有问题。 |
|