fix:精简工程
This commit is contained in:
14
bash/close_shell.sh
Normal file
14
bash/close_shell.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#查找进场pid
|
||||
pname=$1
|
||||
pid=`ps -ef|grep ${pname}|grep -v "grep"|awk '{print $2}'`
|
||||
echo $pid
|
||||
#pid转换数组
|
||||
pids=($pid)
|
||||
#循环kill
|
||||
for pid in ${pids[@]}
|
||||
do
|
||||
echo kill${pid}
|
||||
kill -9 $pid
|
||||
echo kill${pid}success
|
||||
sleep 1
|
||||
done
|
||||
Reference in New Issue
Block a user