Search This Blog

Pages

Thursday, May 21, 2020

Daily confirmed COVID-19 deaths per million people

I think the most appropriate metric to compare effect of corona virus across countries is to see Daily confirmed COVID-19 deaths per million people by country.

This can be seen here: https://ourworldindata.org/grapher/new-covid-deaths-per-million?tab=chart&time=2020-05-20&country=BGD+BRA+CHN+DEU+IND+IRN+ITA+PAK+RUS+SGP+ZAF+ESP+LKA+THA+GBR+USA+OWID_WRL

Wednesday, May 20, 2020

How to test internet connectivity on Linux

Without ping

#!/bin/bash
wget -q --spider http://google.com
if [ $? -eq 0 ]; then
    echo "Online"
else
    echo "Offline"
fi

-q : Silence mode
--spider : don't get, just check page availability
$? : shell return code
0 : shell "All OK" code

Without wget

#!/bin/bash
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
if [ $? -eq 0 ]; then
    echo "Online"
else
    echo "Offline"
fi

Source: https://stackoverflow.com/a/26820300/490192