linux查看某个进程是否存在 linux判断进程是否存在?
linux判断进程是否存在?结合使用PS command和grep command来确定服务名称是否存在:SVC=“sendmail”IFPs EF | grep$SVC | egrep vgrep&
linux判断进程是否存在?
结合使用PS command和grep command来确定服务名称是否存在:SVC=“sendmail”IFPs EF | grep$SVC | egrep vgrep>/dev/nullthenecho“$svcisstarted!“elseeeecho”$svcnotfound!“fi Description:PS EF:显示当前正在运行的所有进程|:pipeline,即上一个命令的输出,作为以下命令的输入grepservice uuName:在输出信息中,查找服务uName数据行egrep vgrep:不显示grep search命令本身