Skip to content

Instantly share code, notes, and snippets.

@mylamour
Last active January 3, 2017 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mylamour/bd49d6390b2ec05b99eaa7924e61ef76 to your computer and use it in GitHub Desktop.
Save mylamour/bd49d6390b2ec05b99eaa7924e61ef76 to your computer and use it in GitHub Desktop.
progress bar with shell .
#!/bin/sh
for((i=0;i<100;i++))
do
sleep 0.1
echo $i | dialog --title 'Copy' --gauge 'Backp file from postgresql!' 10 70 0
done
#!/bin/sh
#this script from chinaunix.net
b=''
for ((i=0;$i<=100;i+=2))
do
printf "progress:[%-50s]%d%%\r" $b $i
sleep 0.1
b=#$b
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment