Guest User

Untitled

a guest
Dec 14th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/bin/sh
  2. CNT=$#
  3. if [ $CNT = 1 ] ; then
  4. ps -ef | grep $1 | grep -v grep | grep -v killsvr | grep -v stop | grep -v tail | awk '{ print $2 }' |\
  5. while read PID
  6. do
  7. echo kill -9 $PID
  8. kill -9 $PID
  9. done
  10. else
  11. echo "[Usage] : kill.sh {process_name}"
  12. fi
Add Comment
Please, Sign In to add comment