online/offline terminal script

Basic Mac terminal script to determine if we are online, or offline, in 30 second intervals, since Knology sucks balls.