Created
July 13, 2014 14:09
-
-
Save mitio/c578b1e49048f1c508e3 to your computer and use it in GitHub Desktop.
Resolves a hostname and copies the A DNS record to the clipboard. OS X only.
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 | |
HOST="$1" | |
echo "Looking up $HOST..." | |
IP=`dig $HOST +short` | |
echo -n $IP | pbcopy | |
echo "Copied $IP to the clipboard." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment