Last active
March 21, 2020 19:39
-
-
Save dusansimic/ea219182a5004d63a99ff3796b1fcbd2 to your computer and use it in GitHub Desktop.
Corona Virus Victims CLI
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 | |
curl 'https://corona-stats.online/serbia?source=2' -s | | |
sed 's/\x1b\[[0-9;]*m//g' | # Remove ANSI color codes | |
grep 'Serbia' | | |
sed 's/\s*//g ; s/║//g ; s/│/;/g' | | |
awk -F';' '{ if ($4 == "") {$4 = 0;} if ($6 == "") {$6 = 0;} print "😷 " $3 " (" $4 ") 💀 " $5 " (" $6 ") 👍 " $7 }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment