Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Scripts to create an IP info summary display' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Scripts to create an IP info summary display
Authored by: skrawcke on Sep 01, '06 08:50:33AM

if you are on a DHCP network you could also use
> ipconfig getpacket <interface name>

to get info like gateway, MAC address, netmask, DNS server and Domain names.

if you know what you are looking for you can use
> ipconfig getoption <interface name> "option name"

like

> ipconfig getoption en0 domain_name
foo.bar.com.

to get just the ip address you can do
> ipconfig getifaddr en0
192.168.1.2

that way you do not need to do any cutting, greping, or awk, in your script.



[ Reply to This | # ]
Scripts to create an IP info summary display
Authored by: jmdevaney on Sep 01, '06 10:55:22AM

True but that is not as much fun as converting hex to decimal... lol


---
Jdevaney



[ Reply to This | # ]