Last active
January 3, 2017 07:38
-
-
Save mylamour/bd49d6390b2ec05b99eaa7924e61ef76 to your computer and use it in GitHub Desktop.
progress bar with shell .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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