Skip to content

Instantly share code, notes, and snippets.

@breiting
Created March 23, 2020 20:08
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 breiting/1bede87db7eb738bb8910d89e4cfaa5b to your computer and use it in GitHub Desktop.
Save breiting/1bede87db7eb738bb8910d89e4cfaa5b to your computer and use it in GitHub Desktop.
COVID-19 script
#!/bin/sh
[ "$(stat -c %y ~/.cache/corona 2>/dev/null | cut -d' ' -f1 )" != "$(date '+%Y-%m-%d')" ] && curl -s https://corona-stats.online/Austria > ~/.cache/corona
grep "Austria" ~/.cache/corona |
sed "s/\s*//g ; s/║//g ; s/│/;/g" |
awk -F';' '{print "confirmed " $3 " (" $9") deaths " $5 " ("$7"%)"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment