linux shell编程中怎么判断时间相等
1个回答
2016-08-01
展开全部
#!/bin/bash
echo "hello!"
T=$(date +%H)
if [ "$T" -lt "12" ];then
echo "Good moring!"
elif [ "$T" -lt "18" ];then
echo "Good afternoon!"
else
echo "Good evening!"
fi
exit 0
echo "hello!"
T=$(date +%H)
if [ "$T" -lt "12" ];then
echo "Good moring!"
elif [ "$T" -lt "18" ];then
echo "Good afternoon!"
else
echo "Good evening!"
fi
exit 0
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询