bash编程心得 时间比较

来源:互联网 发布:ev3相扑机器人编程 编辑:程序博客网 时间:2024/05/29 15:04

 

#!/bin/bash
date1=`date +%y%m%d%H`
if [ "$date1" -gt "08022800" ]
then
      echo "after"
else
      echo "before"
fi