1. tomcat 服务批量添加定时任务
for i in $(ll -d /dir/*tomcat*|awk '{print $NF}');do echo "40 02 * * * /bin/bash /dir/file.sh $i >/dev/null 2>&1"»/var/spool/cron/root;done