# Pastebin XFl8fjhe #!/bin/bash wget -q --tries=10 --timeout=20 -O - http://google.com > /dev/null if [[ $? -eq 0 ]]; then echo "Online" else echo "Offline" fi