Created
June 5, 2009 23:40
-
-
Save electrum/124578 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
!/bin/bash | |
# kill currently running java process | |
echo "Java processes: $(pgrep java)" | |
pkill -9 java | |
for i in $(seq 1 20) | |
do | |
sleep 1 | |
pgrep java || exit | |
echo "Java still running: $(pgrep java)" | |
pkill -9 java | |
done | |
echo "Failed to kill Java" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment