External IP address from Terminal to clipboard
On my mac when I run ip on Terminal, my external IP address is sent to the clipboard like a charm. All you need is create an alias using curl, a web service that returns your remote IP and pbcopy.
Just add the following line on ~/.profile:
alias ip="curl -s http://ipecho.net/plain | pbcopy"
Linux users can replace pbcopy with xsel or xclip like jacaetevha posted here.
Written by Pablo Dias
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#