#!/bin/bash while true; do ping -c 1 -W 10 -n www.google.com > /dev/null && echo $(date +%s) >> ping.txt sleep 60 done