获取进程ID

ps -ef|grep nginx|awk 'NR==1{print $2}'  #获取进程第一个第一行ID
原文地址:https://www.cnblogs.com/wuzhiyi/p/9682582.html