Skip to content

Instantly share code, notes, and snippets.

@Sam-Gram
Last active October 3, 2018 16:27
Show Gist options
  • Save Sam-Gram/4d620e02ce281c1869683796553c6e2b to your computer and use it in GitHub Desktop.
Save Sam-Gram/4d620e02ce281c1869683796553c6e2b to your computer and use it in GitHub Desktop.
Find IP Bash Tested on Ubuntu 16.04
# I put this in my .bashrc.
whatismyip ()
{
host myip.opendns.com resolver1.opendns.com | grep --color=auto 'has address' | awk '{print $4}'
}
#GLWT(Good Luck With That) Public License
#Copyright (c) Everyone, except Author
#The author has absolutely no clue what the code in this project does.
#It might just work or not, there is no third option.
#Everyone is permitted to copy, distribute, modify, merge, sell, publish,
#sublicense or whatever they want with this software but at their OWN RISK.
# GOOD LUCK WITH THAT PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION
#0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A
#TRACE TO TRACK THE AUTHOR of the original product to blame for or hold
#responsible.
#IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#Good luck.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment