shell脚本一个时间循环
发布时间:2020-12-15 16:53:46 所属栏目:安全 来源:网络整理
导读:#!/bin/bash#以小时循环#shx.sh20170101012017010301stime=$1etime=$2while:doecho$stimestime=$(date-d"${stime:0:8}${stime:8:2}1hour"+%Y%m%d%H)if[[$stime-gt$etime]]thenbreakfidone #!/bin/bash#以天做循环#shx.sh2017010120170103stime=$1etime=$2whi
#!/bin/bash #以小时循环 #shx.sh20170101012017010301 stime=$1 etime=$2 while: do echo$stime stime=$(date-d"${stime:0:8}${stime:8:2}1hour"+%Y%m%d%H) if[[$stime-gt$etime]] then break fi done #!/bin/bash #以天做循环 #shx.sh2017010120170103 stime=$1 etime=$2 while: do stime=$(date-d"$stime1day"+%Y%m%d) if[[$stime-gt$etime]];then break; fi done (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在Bootstrap中的CSS转换中的JavaScript – “强制回流”
- scala – 用已验证的repo覆盖sbt默认解析器?
- 干货|angular ng-content在paletx2.0模式开发中的应用
- 是否连续两次调用getrusage可以产生越来越多的结果?
- 老男孩教育每日一题-第76天-说说/etc/profile /etc/bashrc
- 在未打开的文件中将行加载到VimScript中的变量中
- 在shell中转换为大写
- Scala:更有效的方法来过滤列表并创建一系列期货
- TP3.2+bootstrap+MSSql2008 项目实战 框架搭建(一)
- angularjs – 使用ng-table动态定义数据标题