shell日期循环

2014-10-29 0 284
shell日期循环
#!/bin/bash

start_date="$1"
end_date=`date -d "+1 day $2" +%Y%m%d` --可以改成自己适用的格式
while [[ $start_date < $end_date  ]]  
do
        echo $start_date
        bash run.sh $start_date //需要循环执行的脚本
        start_date=`date -d "+1 day $start_date" +%Y%m%d`
done

遇见资源网 shell shell日期循环 http://www.ox520.com/16693.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务