下面是小编精心整理的母亲节脚本编写范文(共含10篇),希望能够帮助到大家。同时,但愿您也能像本文投稿人“jing49854”一样,积极向本站投稿分享好文章。
以下是重启Linux下某进程的shell脚本,以tomcat进程为例:
#!/bin/shpid=`ps -ef|grep tomcat|grep -v grep|awk '{print $2}'`if [ “$pid” = “” ] ; then echo “tomcat service does not start!”else kill -9 $pid pid1=`ps -ef|grep tomcat|grep -v grep|awk '{print $2}'` if [ “$pid1” = “” ] ; then echo “Successfully kill tomcat processes: ” $pid else echo “tomcat kill process failed!” exit 1 fifirm -rf /opt/tomcat/work/*./startup.shpid2=`ps -ef|grep tomcat|grep -v grep|awk '{print $2}'`if [ “$pid2” = “” ] ; then echo “tomcat service failed to start!”else echo “tomcat service starts successfully:” $pid2fi
“ print ”
This page was generated by a Python CGI script.
“ print ”