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
<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>
阅读(870) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
posted @ 2016-03-30 10:32  张同光  阅读(1104)  评论(0编辑  收藏  举报