shell 某一行上数字增加效果 tpu-hello
1 #!/bin/bash2
3 echo -n "Count :"
4 i=0
5
6 tput sc
7
8 tput civis
9 while true
10 do
11 if [ $i -le 5 ]; then
12 sleep 1
13 #echo -e -n "$i"
14
15 let i++
16 tput rc
17 tput ed
18 echo -e -n "$i"
19 else
20 tput cnorm
21 #echo
22 exit 0
23 fi
24 done
页:
[1]