Created
December 25, 2018 21:13
-
-
Save ikanoano/3f716166adc6b321a1d90ee5c9b7f156 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/sh | |
cnt=1; | |
zero=`date +%s` | |
ping -4 -i1 $(ip) | while read line; do | |
line=`echo $line | awk -F= '{print $4}'` | |
now=$((`date +%s` - $zero)) | |
timestamp="$(( $now/3600 )):$(( ($now/60)%60 )):$(( $now%60 ))" | |
timestamp="$timestamp,000 --> $timestamp,999" | |
echo $cnt | |
echo $timestamp | |
echo $line | |
echo "" | |
cnt=$((cnt+1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment