假设tesh.sh为需要关闭的程序名称
#!/bin/bash
tmp=`ps -ef | grep test.sh| grep -v grep | awk '{print $2}'`
echo ${tmp}
kill -9 ${tmp}
假设tesh.sh为需要关闭的程序名称
#!/bin/bash
tmp=`ps -ef | grep test.sh| grep -v grep | awk '{print $2}'`
echo ${tmp}
kill -9 ${tmp}