运维网's Archiver
论坛
›
Shell/Powershell
› 进度条---shell脚本版本
枫叶飞翔
发表于 2018-8-28 07:05:04
进度条---shell脚本版本
#!/bin/bash
bar=""
count=0
clock=("|" "/" '-' '//')
index=0
while [ $count -le 100 ]
do
printf "[%-100s] [%d] [%c]\r" "$bar" "$count" "${clock}"
bar=${bar}"="
((count++))
((index=count%4))
sleep 0.05
done
printf "\n"
页:
[1]
查看完整版本:
进度条---shell脚本版本