Linux shell 下简单的进度条实现
[root@db145 ~]# cat print_process.sh function Proceess(){ spa='' i=0 while [ $i -le 100 ] do printf "[%-50s] %d%% " "$spa" "$i"; sleep 0.5 ((i=i+2)) spa+='#' done echo } Proceess [root@db145 ~]# sh print_process.sh [####### ] 14%