second=10
echo -en "\n****倒计时$second秒开始****\t\t"for i in $(seq $second -1 1)do #echo -ne "\033[s" #echo -ne "\033[1;31m$i \033[0m" #sleep 1 #echo -ne "\033[u" echo -ne "\033[1;31m\b\b\b $i \033[0m" sleep 1done本文共 257 字,大约阅读时间需要 1 分钟。
second=10
echo -en "\n****倒计时$second秒开始****\t\t"for i in $(seq $second -1 1)do #echo -ne "\033[s" #echo -ne "\033[1;31m$i \033[0m" #sleep 1 #echo -ne "\033[u" echo -ne "\033[1;31m\b\b\b $i \033[0m" sleep 1done转载于:https://blog.51cto.com/menglinux/1436439