在shell中实现进度条: #!/bin/sh b='' for ((i=0;$i<=100;i+=2)) do printf "progress:[%-50s]%d%%\r" $b $i sleep 0.1 b=#$b done echo