复制代码 代码如下:
#!/bin/bash
COUNTER=0
_R=0
_C=`tput cols`
_PROCEC=`tput cols`
tput cup $_C $_R
printf "["
while [ $COUNTER -lt 100 ]
do
COUNTER=`expr $COUNTER + 1`
sleep 0.1
printf "=>"
_R=`expr $_R + 1`
_C=`expr $_C + 1`
tput cup $_PROCEC 101
printf "]%d%%" $COUNTER
tput cup $_C $_R
done
printf "\n"
#!/bin/bash
COUNTER=0
_R=0
_C=`tput cols`
_PROCEC=`tput cols`
tput cup $_C $_R
printf "["
while [ $COUNTER -lt 100 ]
do
COUNTER=`expr $COUNTER + 1`
sleep 0.1
printf "=>"
_R=`expr $_R + 1`
_C=`expr $_C + 1`
tput cup $_PROCEC 101
printf "]%d%%" $COUNTER
tput cup $_C $_R
done
printf "\n"
标签:
shell,进度条
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
内蒙古资源网 Copyright www.nmgbbs.com
暂无“shell 进度条实现代码”评论...