Created
December 8, 2012 04:28
-
-
Save shirkey/4238621 to your computer and use it in GitHub Desktop.
Copy local IP addresses from shell to X clipboard buffer (requires xsel package)
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
alias pbcopy='xsel --clipboard --input' | |
function ip { | |
IP=$(ifconfig | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | cut -c 6-) | |
echo $IP | |
echo $IP | pbcopy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment