#!/bin/bash
read -p "输入你定时的时间(格式为时:分:秒):" ntime
while true
do
now=`date +%H:%M:%S`
echo $now
sleep 1
clear
if [ "$ntime" == "$now" ];then
for (( i=0;i<10;i++))
do
echo -n "*"
sleep 1
done
break
fi
done
echo
echo "时间到了"
#!/bin/bash
read -p "输入你定时的时间(格式为时:分:秒):" ntime
while true
do
now=`date +%H:%M:%S`
echo $now
sleep 1
clear
if [ "$ntime" == "$now" ];then
for (( i=0;i<10;i++))
do
echo -n "*"
sleep 1
done
break
fi
done
echo
echo "时间到了"
上一篇:查看某个进程是否存在的脚本
下一篇:九九乘法表shell脚本
shell
shell脚本基础小习题(二)
利用 shell for while 打印出 100以内的质数
shell脚本基础的小习题
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M