shell根据程序名获取进程号

shell根据程序名获取进程号:

  ps -A | grep "cmdname" | awk '{print $1}'

原文地址:https://www.cnblogs.com/live-program/p/11096481.html