Ping via Timestamp

Figured I would make a quick post. Do think as much as ping is a networkers tool the fact that there is no timestamps is pretty sad.

Came across a post from jocke where he posted this lovely command.

1. To post valid replies
ping google.com | awk '/^[0-9]+ bytes from / { "date" | getline pong; close("date"); print pong":",$0; }'

2. To post valid replies and failures
ping google.com | while read pong; do echo "$(date): $pong"; done

Kudos to Jocke:

The featured image was a perfect test since I was testing while roaming in Canada and using Cricket Wireless 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *