linux查找某进程id并杀掉
#!/bin/sh tomcat_id=$(ps -ef | grep tomcat | grep -v "grep" | awk ‘{print $2}‘) for tomcatid in $tomcat_id do kill -9 ${tomcatid} echo "killed tomcat_id $tomcatid" done sh /data/4a/tomcat/bin/startup.sh echo "restart tomcat..."
#"--------4a--------"tomcat_id=$(ps -ef | grep tomcat | grep -v "grep" | awk ‘{print $2}‘)for tomcatid in $tomcat_iddo kill -9 ${tomcatid} echo "killed tomcat_id $tomcatid" donesh /data/4a/tomcat/bin/startup.shecho "restart tomcat..."
相关推荐
rechanel 2020-11-16
taomengxing 2020-09-07
wintelx 2020-08-09
NBkiller 2020-06-14
wandererdl 2020-06-14
CARBON 2020-06-11
xushxbigbear微信 2020-06-09
chenjinlong 2020-06-04
eroshn 2020-05-31
timegoes 2020-04-12
luvzhan 2020-04-12
kylinos 2020-03-07
季诗筱 2020-03-07
神龙 2020-05-11
jyj00 2020-05-04
LychieFan 2020-05-03
csdnyasin 2020-05-01
huguang 2020-04-22