Skip to content

Instantly share code, notes, and snippets.

@tbaschak
Created June 16, 2014 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbaschak/a60842eb3838926186c3 to your computer and use it in GitHub Desktop.
Save tbaschak/a60842eb3838926186c3 to your computer and use it in GitHub Desktop.
#!/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