[PowerShell] shell循环判断进程是否存在 →→→→→进入此内容的聊天室

来自 , 2019-10-14, 写在 PowerShell, 查看 117 次.
URL http://www.code666.cn/view/1a37546d
  1. #!/bin/sh
  2.  
  3. while true
  4. do
  5.         process=`ps aux | grep mysqld | grep -v grep`;
  6.  
  7.         if [ "$process" == "" ]; then
  8.                 sleep 1;
  9.                 echo "no process";
  10.         else
  11.                 echo "process exsits";
  12.                 break;
  13.         fi
  14. done
  15.  
  16. //shell/1284

回复 "shell循环判断进程是否存在"

这儿你可以回复上面这条便签

captcha