直接看代码吧,很简单
复制代码 代码如下:#!/bin/bash
b=""i=0while [ $i -le 100 ]do printf "progress:[%-50s]%d%% " $b $i sleep 0.1 i=`expr 2 + $i` b=#$bdoneecho