Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # if arguments not empty
- if [ -n "$1" ]; then
- KILLPS=$1
- fi
- # if KILLME not exists
- if [ -z "$KILLPS" ]; then
- KILLPS=$(dirname $(pwd))
- fi
- # if KILLME exists
- if [ -n "$KILLPS" ]; then
- ps -ef|grep $KILLPS|awk '{print $2}'|xargs kill
- fi
Add Comment
Please, Sign In to add comment