To extract the PID use awk command and send the argument to xargs command.
ex: To kill activemq process use the below command
ps -ef | grep $USER | grep java | grep activemq | awk '{print $2}' | xargs kill -9
ex: To kill activemq process use the below command
ps -ef | grep $USER | grep java | grep activemq | awk '{print $2}' | xargs kill -9
No comments :
Post a Comment