Skip to content

Instantly share code, notes, and snippets.

@breiting

breiting/covid.sh

Created Mar 23, 2020
Embed
What would you like to do?
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