>我几乎无法解决然后编程帮助
T=`date + %k`
if [ $t –ge 0 –a $t –le 12 ];
then
echo “Good Morning”
elif[ $t –ge 12 –a $t –le 14 ];
then
echo “Good Afternoon”
elif[ $t –ge 14 –a $t –le 18 ];
then
echo “Good Evening"
else
echo “Good night”
fi
输出:[:d意外运算符
t=`date +%k`
if [ $t -ge 0 -a $t -le 12 ];
then
echo "Good Morning"
elif [ $t -ge 12 -a $t -le 14 ];
then
echo "Good Afternoon"
elif [ $t -ge 14 -a $t -le 18 ];
then
echo "Good Evening"
else
echo "Goodnight"
fi