Created
March 19, 2020 15:53
-
-
Save jjrh/bd9f876834184c42bccee17795757e6c to your computer and use it in GitHub Desktop.
show corona-stats from https://corona-stats.online every hour (change timedelay to be longer) ARG1 is country code. Empty arg is world stats. Ie: ./stats.sh CA
This file contains hidden or 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/bash | |
x=1 | |
inf=0 | |
timedelay=3600 | |
COUNTRY_CODE="$1" | |
while [ $inf -le 1 ]; do | |
clear | |
sleep 0.5 | |
curl "https://corona-stats.online/$COUNTRY_CODE" | |
x=1 | |
while [ $x -le $timedelay ] | |
do | |
printf "\033[K" | |
printf "\033[10D" | |
printf "$x/$timedelay" | |
sleep 1 | |
x=$(( $x + 1 )) | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment