Skip to content

Instantly share code, notes, and snippets.

@jollychang
Created May 5, 2011 05:34
Show Gist options
  • 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