📜  检查进程并在运行 Linux 时终止 - Shell-Bash 代码示例
📅  最后修改于: 2022-03-11 14:51:37.234000             🧑  作者: Mango
代码示例1
if pgrep process_name 2>/dev/null; then
echo "Terminating process_name"
pkill process_name
fi