Created
June 16, 2014 05:20
-
-
Save tbaschak/a60842eb3838926186c3 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 | |
function usage () | |
{ | |
echo "Usage:" | |
echo " $0 <IP6 | hostname>" | |
echo "OR" | |
echo " $0 <IP6 | hostname> | tee mylog.txt" | |
} | |
if [ $# -ne 1 ]; then | |
usage | |
exit 127 | |
fi | |
IP=$1 | |
ping6 $IP | while read pong; do echo "$(date): $pong"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment