Created
September 28, 2020 19:26
-
-
Save paulmaunders/29cb985af81f126cb0db20cc9393faf8 to your computer and use it in GitHub Desktop.
Last 14 days COVID-19 hospital patients in England
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
curl --compressed 'https://api.coronavirus.data.gov.uk/v1/data?filters=areaType=nation;areaName=England&structure=%7B%22date%22:%22date%22,%22hospitalCases%22:%22hospitalCases%22%7D&format=xml' | ggrep -Pio "<hospitalCases>\K([^<]+)" | perl -e "print reverse(<>)" | tail -n 14 | paste -sd "," - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that this requires GNU grep to get the Perl Compatible Regular Expressions to work on OSX. You can install through brew:
brew install grep
It can then be used via
ggrep