Linux Shell 获取进程号并杀掉该进程
方法一:
kill -9 $(ps -ef | grep nginx | grep -v grep | awk '{print $2}')
方法二:
ps -ef | grep nginx | grep -v grep | awk '{print $2}' | xargs kill -9
方法一:
kill -9 $(ps -ef | grep nginx | grep -v grep | awk '{print $2}')
方法二:
ps -ef | grep nginx | grep -v grep | awk '{print $2}' | xargs kill -9