Linux shell 检查进程PID
## check the pid of such program#checkPid() {if [ -z "`ps x | grep $1 | grep -v grep | grep -v $0 | awk "{print $1}"`" ]; thenecho "The $1 program cant run well."fi}简单说明:ps 报告程序状况。ps x 显示所有程序,不以终端机来区分。$1 函数的第一个参数,如: checkPid test ...