Skip to content

Instantly share code, notes, and snippets.

@ialex32x
Created May 13, 2019 08:57
Show Gist options
  • Save ialex32x/8af93d26d2a5ead0d618408dcbdbb4e6 to your computer and use it in GitHub Desktop.
Save ialex32x/8af93d26d2a5ead0d618408dcbdbb4e6 to your computer and use it in GitHub Desktop.
sh 查找所有指定名字的进程并杀死
#!/bin/bash
WORKSPACE=$(cd `dirname $0`;pwd)
EXE=./bin/sgless
LOGPATH=./log
echo killing old
ps aux | grep $EXE | awk '{print $2}' | xargs kill -9
sleep 1s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment