标签:linux res ef ash grep oc ca bash
# cat > check_process_is_end.sh
while true
do
sleep 30
res=`ps -ef | grep RNAhybrid`
count=`grep -o "RNAhybrid" <<<"$res" | wc -l`
if [ "$count" -eq "1" ] ; then
echo $res
echo -en "\007"
sleep 1
echo -en "\007"
sleep 1
echo -en "\007"
fi
done
# chmod u+x check_process_is_end.sh
# ./check_process_is_end.sh
NOTE: RNAhybrid is a process name.
check if a linux process is done using bash,布布扣,bubuko.com
check if a linux process is done using bash
标签:linux res ef ash grep oc ca bash
原文地址:http://www.cnblogs.com/emanlee/p/3872664.html