#!/bin/sh ping -c 1 -W 1 8.8.8.8; while [ $? != 0 ]; do ping -c 1 -W 1 8.8.8.8; done