Created
September 19, 2014 15:08
-
-
Save olimortimer/9c6c3cf8d1364f4fe9d2 to your computer and use it in GitHub Desktop.
Shell: Ping with timestamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ping with timestamp | |
ping google.com | while read pong; do echo "$(date): $pong"; done | |
# Ping to file | |
ping google.com >> ping.txt | |
# Ping with timestamp to file | |
ping google.com | while read pong; do echo "$(date): $pong"; done >> ping.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment