shell进度条

  先记录一种进度条实现:

 1 #!/bin/bash
 2 
 3 b=''
 4 i=0
 5 while [ $i -le  100 ]
 6 do
 7     printf "progress:[%-50s]%d%%\r" $b $i
 8     sleep 0.1
 9     i=`expr 2 + $i`        
10     b=#$b
11 done
12 echo

   shell能够实现很多很酷的功能,有遇到都会记录下来。

原文地址:https://www.cnblogs.com/wuchaofan/p/3003816.html