shell脚本中生成延时

#!/bin/bash
echo -n count:
tput sc

count=0;
while true;
do
if [ $count -lt 40 ];
then
   let count++;
   sleep 1;
   tput rc
   tput ed
   echo -n $count;
else exit 0;
fi
done

tput sc 存储光标位置;

tput rc 恢复光标位置;

tput ed 清除从当前光标位置到行尾之间的所有内容

 

posted on 2015-04-19 18:19  珩~  阅读(1951)  评论(0编辑  收藏  举报

导航