Created
January 10, 2017 01:13
-
-
Save sasha42/26f2115989ccef4f94a7028ae81b59c6 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# saves date and average of 4 pings to 8.8.8.8 into log file | |
count=$(ping -c 4 8.8.8.8 | tail -1 | awk '{print $4}' | cut -d '/' -f 2) | |
echo "$(date) $count" > pingresponselog.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment