echo 'stop the tomcat ...' ps aufx|grep tomcat|awk '{print $2}'|xargs kill -9 echo 'stop tomcat ok...' rm -rf /test/helloword/ mkdir /test/helloword/ echo 'dele old ok..' mv /test/helloword.war /test/helloword/ cd /test/helloword/ jar xvf helloword.war > helloword.txt rm -r helloword.war cp -r /test/helloword_properties /test/helloword/ echo 'create new ok...' cd /usr/local/tomcat6/bin/ ./startup.sh cd /usr/local/tomcat6_2/bin/ ./startup.sh echo 'ok!'