标签:bsp read col bin path int agent ssi star
#!/bin/bash #@author vickey main() { TMP_PATH="/home/test" echo "are you sure to del all files in test/?" echo "y/n?: " read answer if [ ${answer} == "y" -o ${answer} == "Y" ] then restart rm -rf /home/test/* echo "you had del files in delete /home/test/*" else echo "never mind,you didn‘t del any files" fi } restart() { cd $TMP_PATH if [ -s "${TMP_PATH}/rm_tmp.txt" ];then touch rm_tmp.txt ps -ef | grep -v grep | grep PatrolAgent >rm_tmp.txt else ps -ef | grep -v grep | grep PatrolAgent >rm_tmp.txt fi processID=`echo | cat rm_tmp.txt | awk ‘{print $2}‘` echo $processID kill -9 $processID } main
标签:bsp read col bin path int agent ssi star
原文地址:http://www.cnblogs.com/vickey-wu/p/7908320.html