实用 shell 脚本(技巧)
1. 控制台打印进度条
#!/bin/bash
b=''
for((i=0; $i<=100; i+=2))
do
printf "progress:[%-50s]%d%%/r" $b $i
sleep 0.1
b=#$b
done
1. 控制台打印进度条
#!/bin/bash
b=''
for((i=0; $i<=100; i+=2))
do
printf "progress:[%-50s]%d%%/r" $b $i
sleep 0.1
b=#$b
done
共有 0 条评论