pheaver / whereAmI

A one line shell script that returns you your ip address and its geolocation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

whereAmI

ShellLicense

A shell script that returns you your ip address and its geolocation.

Installation

$ cd ~
$ git clone https://github.com/trozler/whereAmI.git

I recommend adding the following alias to your bashprofile (~/.bash_profile). ~/.bashrc should also work.

$ echo -e '\nalias myip="/bin/bash ~/whereamI/findmepls.sh"' >> ~/.bash_profile
$ source ~/.bash_profile

How to run

If you created the alias:

$ myip
88.2.154.243 - Balearic Islands, Spain.

Otherwise:

$ /bin/bash ~/whereAmI/findmepls.sh
88.2.154.243 - Balearic Islands, Spain.

Note on usage

This script utilises a free api which allows for 3 requests per second.

Lastly, if you are not connected to the internet, then well, you must be somewhere off the shoulder of Orion.

About

A one line shell script that returns you your ip address and its geolocation.

License:MIT License


Languages

Language:Shell 100.0%