#!/bin/bash
# author : kl
#倒计时脚本
read -p '请输入时间: ' -s o
for ((i=$o;i>=0;i--))
do
if [ "$i" = "0" ]
then
echo "Time is over. "
exit
fi
((Minute=$i/60))
((Second=$i%60))
echo "$Minute : $Second"
sleep 1
clear
done
Shell 倒计时脚本
最新推荐文章于 2024-06-12 14:02:38 发布