check if a linux process is done using bash
时间:2014-07-28 15:06:23
收藏:0
阅读:293
# 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.
评论(0)