码迷,mamicode.com
首页 > 系统相关 > 详细

shell 中可以for 循环的时间加减日期格式

时间:2018-11-21 19:37:48      阅读:412      评论:0      收藏:0      [点我收藏+]

标签:style   shell   color   不可   for循环   循环   code   日期   class   

for num in {88..3};do
# LAST_HOUR=`date -d -${num} hour +%H`  不可for循环,报格式错误
LAST_HOUR=`date "+%H" -d -${num}hour`

 

shell 中可以for 循环的时间加减日期格式

标签:style   shell   color   不可   for循环   循环   code   日期   class   

原文地址:https://www.cnblogs.com/tnsay/p/9996826.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!