Created
March 26, 2014 20:05
-
-
Save connormckelvey/9791993 to your computer and use it in GitHub Desktop.
Copy IP of hostname to Clipboard
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
function tip(){ | |
host -t a $1 | awk '{print $4}' | egrep ^[1-9] | pbcopy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is great! Tried a few different things to echo the ip to the screen as well, but couldn't get it working. Any suggestions?