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 1
done
本文出自 “爱武装一辈子” 博客,请务必保留此出处http://menglinux.blog.51cto.com/8733806/1436439
原文地址:http://menglinux.blog.51cto.com/8733806/1436439