代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function process(){
spa=''
i=0
while [ $i -le 100 ]
do
printf "[%-50s] %d%% \r" "$spa" "$i";
sleep 0.5
((i=i+2))
spa+='#'
done
echo
}

process