Skip to content

Instantly share code, notes, and snippets.

@jollychang
Created May 5, 2011 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jollychang/956587 to your computer and use it in GitHub Desktop.
Save jollychang/956587 to your computer and use it in GitHub Desktop.
kill firefox
#!/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