shell ip循环样例
2016-12-02 17:16
239 查看
#! /bin/sh day1=`date +%Y%m%d%H0000 -d '-1 hours'` day2=`date +%Y%m%d -d '-1 hours'` day3=`date +%H00 -d '-1 hours'` day5=`date +%Y%m%d%H0000 -d '-24 hours'` day4=`date +%H -d '-1 hours'` start=23 echo $day1,$day2,$day3,$day4 ip=() for i in ${ip[@]} do { echo ${i} /opt/bi/push/pushPretreatment/pushPretreatmentBarrel.sh 300 15 /opt/bi/push/barrel/barrel_ /opt/bi/push/pushdata/Push_pushAuthLog_${day1}_${i}.txt $day2-$day3 $day2-$day3 }& done wait /opt/bi/push/pushPretreatment/catAndPushPretreatment.sh 300 15 /opt/bi/push/barrel_${day2}-${day3} $day2-$day3 $day2-$day3 echo "end time: " `date` wait cd /opt/bi/push/pushdata/ rm /opt/bi/push/pushdata/Push_pushAuthLog_${day5}_*.txt if [ $day4 == $start ] then /opt/bi/push/pushPretreatment/lzopPushPretreatment.sh $day2-$day3 $day2-$day3 cd /opt/bi/push/barrel rm -rf barrel* cd /opt/bi/push/result rm result_* else echo "not start" fi
相关文章推荐
- shell until循环ping检测ip脚本
- Shell until循环
- Shell判断子进程(pid)状态实现动态循环
- Shell脚本判断IP是否合法性(多种方法)
- shell-8-循环语句
- shell编程之while死循环
- shell基础(输入参数、分支、循环)
- Shell until循环
- Shell脚本for循环语句简明教程
- 20170208--shell-for-while循环+小脚本文件的备份
- Shell脚本之无限循环的两种方法
- shell脚本编程之循环语句学习笔记
- shell脚本中的循环
- Shell判断输入是否有效IP和字母
- 判断IP网段的shell脚本
- shell中的循环语句、判断语句实例
- shell 递归函数---循环拷贝文件到指定目录
- Linux_shell_win7_dos_cmd_IP_查看帮助
- 每日一shell(七)统计站点的IP和PV
- 使用 shell 脚步循环执行命令