shell习题100(九)

题目要求 编写一个问候程序,它执行时能根据系统当前的时间向用户输出问候信息。假设从半夜到中午为早晨,中午到下午六点为下午,下午六点到半夜为晚上。web 参考答案 #!/bin/bash d=`date +%H` if [ $d -ge 0 -a $d -lt 7 ] then tag=1 elif [ $d -ge 7 -a $d -lt 12 ] then tag=2 elif
相关文章
相关标签/搜索