Skip to content

Instantly share code, notes, and snippets.

@iOS0x00
Last active December 16, 2015 06:49
Show Gist options
  • Save iOS0x00/5394146 to your computer and use it in GitHub Desktop.
Save iOS0x00/5394146 to your computer and use it in GitHub Desktop.
快速查找后台进程,用于终止进程很方便。
IDS=`ps ax -o pid:1,args|grep demo.py|grep -v SCREEN|cut -d " " -f 1`
if [ "$IDS" == "" ];then
echo "not running"
exit 2
else
kill $IDS
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment