Created
April 3, 2018 01:17
-
-
Save nic/8a5429aa1aaa77d7f052143f6d2d074f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
if [ -z "$1" ]; then | |
echo -e "Usage:\n $0 address\n\nEx: $0 google.com" | |
exit 0 | |
fi | |
for ip in `nslookup $1 |grep Address|grep -v 53 |cut -d":" -f2|cut -d' ' -f2`; do | |
echo "$ip -> $(ping -c 1 "$ip" | grep time |cut -d'=' -f4)"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment