标签:style blog java color art re
启动脚本
startup.sh
#!/bin/bash x=$(($1)) while (($x>0)) do java -jar /home/chenpenghui/crawler/crawler-hb/StartUpIp.jar & sleep 3 x=$(($x-1)) done
线程数 等于 输入值
启动如下
./startup.sh 10
停止脚本
clean.sh
#!/bin/bash kill -9 `ps ax|grep /home/chenpenghui/crawler/crawler-hb/StartUpIp.jar|awk ‘{print $1}‘`
./clean.sh
查看进程
ps aux|grep java
linux_后台启动多个java -jar 程序,及关闭,布布扣,bubuko.com
标签:style blog java color art re
原文地址:http://www.cnblogs.com/cphmvp/p/3849512.html