Skip to content

numberwhun/whatsmyip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

whatsmyip
---------
 
A bash script to determine what the ip is of the machine it is executed on.

When this script is executed, it will try to determine if it is beig run on either Solaris, Linux or Mac OSx.
The current options are:

	SunOS  -> Solaris
	Linux  -> Linux
	Darwin -> Mac OSx

The script, based off of the findings of which OS it is working on, will determine which interfaces are active, and report back the IP of the interface that is active.  This only supports the primary interfaces on a machine, and not any virtual interfaces. 

If there are any issues with this script, please be sure and let me know.  Feel free to open an issue if you find any bugs or if you think there is a 'nice to have' feature. 

*Note:  I realize that there are some machines that have multiple interfaces.  Currently, the Solaris code will refer all interfaces with IPs, except the 127.0.x.x addresses, which are typically loopback type addresses.  I am not sure if I want to concentrate on just the bge interfaces or not, but will decide soon.

About

A bash script to determine what the ip is of the machine it is executed on.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published