Skip to content

Instantly share code, notes, and snippets.

@illuzian
Created November 9, 2020 00:35
Show Gist options
  • Save illuzian/b3e55af18d34ca271bc98c2d6bd3e1d4 to your computer and use it in GitHub Desktop.
Save illuzian/b3e55af18d34ca271bc98c2d6bd3e1d4 to your computer and use it in GitHub Desktop.
One liner to check online status of websites
# Check status of a list of websites in the file check_hosts.txt. Increase --max-time if sites are slow to respond
cat check_hosts.txt | while read host; do echo $host $(curl --ssl -Is "$host" -K HEAD --max-time 3 | head -1); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment