if ! pgrep -x "进程名" > /dev/null; then
echo "进程不存在"
else
echo "进程存在"
fi

posted on 2024-01-11 11:03  北京开发  阅读(2)  评论(0编辑  收藏  举报