![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
qq_36748772
这个作者很懒,什么都没留下…
展开
-
shell获取当前事前前一小时的时间
date -d "1 hour ago" +"%Y-%m-%d %H:%M"原创 2018-03-31 10:37:42 · 11614 阅读 · 0 评论 -
shell循环日期
#!/bin/bashstartDate=20170901endDate=20171008startSec=`date -d "$startDate" "+%s"`endSec=`date -d "$endDate" "+%s"`for((i=$startSec;i<=$endSec;i+=86400))doyd=`date -d "@$i" "+%Y%m%d"`echo原创 2018-03-31 10:39:18 · 685 阅读 · 0 评论 -
shell循环
#!/bin/bashdataarray=("20170131" "20170228" "20170331" "20170430" "20170531" "20170630" "20170731" "20170831" "20170930" "20171031")for var in ${dataarray[@原创 2018-03-31 11:13:27 · 112 阅读 · 0 评论 -
shell调度重跑小时周期python任务
公司有小时的任务,由于平台不稳定,经常出现需要按小时重跑历史数据的问题,写这个脚本可以按照开始日期 开始小时 结束日期 结束小时 按照小时重跑需要输入3(按天)个或者5(按小时)个参数脚本名称-绝对路径开始日期开始小时(天无)结束日期结束小时(天无)水平有限,拒绝恶意攻击#!/bin/bash#echo "Shell 输出脚本名称及参数";#echo "传入参数的个数:$#"#echo "执行的脚...原创 2018-03-31 17:10:55 · 691 阅读 · 0 评论