#!/bin/bash
batch_date2="20210723"
end_day="20210830"
while [ "${batch_date2}" -le "${end_day}" ];
do
#生成字典文件
>icl_test.txt #已存在该文件,清空该文件
batch_date=$(date -d "${batch_date2}" +%Y-%m-%d)
echo ${batch_date} >>icl_test.txt
end_day2=${batch_date2}
while [ "${batch_date2}" -le "$(date -d "${end_day2} 3day" + %Y%m%d)" ];
do
batch_date02=$(date -d "${batch_date2} 1day" +%Y-%m-%d )
echo ${batch_date02} >>icl_test.txt
batch_date2=$(date -d "${batch_date2} 1day" +%Y-%m-%d )
done
batch_date02=$(date -d "${batch_date2} 1day" +%Y-%m-%d )
done
详细解决方案
shell循环生成日期
热度:27 发布时间:2023-09-28 05:45:09.0
相关解决方案
- 遇到一个怪有关问题,createobject("wscript.shell").run "a.vbs" vbs咋是多线程的
- shell 获取字符串中某单纯词的后面一个单词
- mongo shell 里边find不出数据
- Shell.Application的异常抓取
- shell 写资料
- shell while循环内的变量在循环外部值不能传送
- shell 程序监控网站网页是不是被修改,如果被修改停止服务器的运行
- shell cd解决方案
- shell 中 在if 语句中执行 查询语句 会出现语法异常 !请高人指点
- shell 函数返回值,该如何解决
- shell cd,该如何解决
- 批量剔除 .svn shell
- mongodb鍏ラ棬<浜?gt;mongodb鐨刯avascript shell
- PHP shell 不能批改服务器的文件
- 编译PHP替interactive shell
- maven-antrun-plugin中没法调用 jsch shell target
- start/stop weblogic server in shell
- IE7.0中 var Wsh=new ActiveXObject("WScript.Shell");保[object error]错解决思路
- 请教为什么小弟我在html中用js可以new ActiveXObject("WScript.Shell"),但是在jsp中却不行呢?小弟初学者,望各位帮助
- java中应用SSH(secure shell)登录远程服务器之后,怎样获得当前文件夹的绝对路径
- unix shell 逐行读文件并赋值给变量解决方法
- unix shell 调用sqlplus 遍历表,该如何处理
- SWT shell 窗体怎么在桌面中央显示
- Linux Qt shell 外部程序解决方案
- adb shell 中am start有关问题求教,请进!
- Android 执行linux shell 语句有关问题
- ,shell 命令,怎么删除当前目录中不包含某字符串的文件
- PHP shell 不能批改服务器的文件
- 编译PHP替interactive shell
- shell 脚本出错“syntax error near unexpected token `'”