Shell,根据进程关键字得到进程id

ps -aef | grep nginx | grep -v grep | awk '{print $2}'  

Grizzly

Never say never!