Guest User

Untitled

a guest
Mar 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # if arguments not empty
  4. if [ -n "$1" ]; then
  5. KILLPS=$1
  6. fi
  7.  
  8. # if KILLME not exists
  9. if [ -z "$KILLPS" ]; then
  10. KILLPS=$(dirname $(pwd))
  11. fi
  12.  
  13. # if KILLME exists
  14. if [ -n "$KILLPS" ]; then
  15. ps -ef|grep $KILLPS|awk '{print $2}'|xargs kill
  16. fi
Add Comment
Please, Sign In to add comment