Created
May 5, 2011 05:34
-
-
Save jollychang/956587 to your computer and use it in GitHub Desktop.
kill firefox
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/sh | |
#kill firefox pid | |
pidlist=`ps -ef|grep firefox | grep -v "grep"|awk '{print $2}'` | |
#ps -u $USER|grep "java"|grep -v "grep" | |
echo "firefox Id list :$pidlist" | |
if [ "$pidlist" = "" ] | |
then | |
echo "no firefox pid alive" | |
else | |
for pid in ${pidlist} | |
{ | |
kill -9 $pid | |
echo "KILL $pid:" | |
echo "service stop success" | |
} | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment