Created
November 13, 2014 01:59
-
-
Save masawada/9cdbd9e09c91c7b8603c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMAND=$1 | |
PID=$(ps ax | grep $COMMAND | peco | awk '{print $1}') | |
if [ ${#PID} -ne 0 ]; then | |
/bin/echo -n "Are you sure to kill process $[PID]? [y/n] " | |
read ans | |
if [ $ans = "y" ]; then | |
kill -9 $PID | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment