SHELL中时间的比较
curtime=`date "+%H:%M:%S"`
date1="08:00:00"
date2="12:00:00"
date3="13:00:00"
date4="17:00:00"
[[ ("$date1" < "$curtime" && "$curtime" < "$date2") || ("$date3" < "$curtime" && "$curtime" < "$date4") ]] && echo $date1 || echo $date2
阅读(870) | 评论(0) | 转发(0) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
date1="08:00:00"
date2="12:00:00"
date3="13:00:00"
date4="17:00:00"
[[ ("$date1" < "$curtime" && "$curtime" < "$date2") || ("$date3" < "$curtime" && "$curtime" < "$date4") ]] && echo $date1 || echo $date2
相关热门文章
- 我的第一个python程序
- PostgreSQL 9.5新特性:IMPORT...
- 导入mysql文件提示“ASCII '\0...
- 欢迎时间神偷在ChinaUnix博客...
- 程序化广告交易中的点击率预估...
给主人留下些什么吧!~~
评论热议