Revision: 30795
Updated Code
at August 28, 2010 02:30 by ksaver
Updated Code
#!/usr/bin/env bash # simplepb.sh # A very simple bash progress bar. # Still needs a lot of work to become useful. # ksaver (at identi.ca), Aug 2010. # License: Public Domain function progr_bar() { MAX=$1 PERCENT=0 FOO=">" BAR="" while [ $PERCENT -lt $(($MAX+1)) ] do echo -ne "\r\t[ " echo -ne "$BAR$FOO ] $((PERCENT*100/$MAX))% " BAR="${BAR}=" let PERCENT=$PERCENT+1 sleep 0.2 done echo -e " Done.\n" } progr_bar 20
Revision: 30794
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 22, 2010 16:12 by ksaver
Initial Code
#!/usr/bin/env bash # A very simple bash progress bar. # Still needs a lot of work to become useful. # ksaver (at identi.ca), Aug 2010. # License: Public Domain function progr_bar() { MAX=$1 PERCENT=0 FOO=">" BAR="" while [ $PERCENT -lt $(($MAX+1)) ] do echo -ne "\r\t[ " echo -ne "$BAR$FOO ] $((PERCENT*100/$MAX))% " BAR="${BAR}=" let PERCENT=$PERCENT+1 sleep 0.2 done echo -e " Done.\n" } progr_bar 20
Initial URL
http://identi.ca/ksaver
Initial Description
Initial Title
A very simple bash progress bar.
Initial Tags
Bash
Initial Language
Bash