Post thumbnail of Bash One-liner to get IP address for each network interface
15 June 2010
Continue reading Bash One-liner to get IP address for each network interface

Bash One-liner to get IP address for each network interface

This one should be pretty bulletproof. Use a single sed command to dump the list of all ip addresses from interfaces showing in ifconfig.

Post thumbnail of Use awk to figure out your ip address from ifconfig for a bash script
3 June 2010
Continue reading Use awk to figure out your ip address from ifconfig for a bash script

Use awk to figure out your ip address from ifconfig for a bash script

99% of the time you can just use the local address to talk to yourself. This is just an example to show you how wrangle the ip address using awk. Rewrite the hosts file so the host itself can use it’s external address by name. Write out the basic stuff in hosts that doesn’t change then write out the current IP address.

Post thumbnail of Grep IP addresses from ifconfig
5 February 2009
Continue reading Grep IP addresses from ifconfig

Grep IP addresses from ifconfig

Here’s a bunch of ways to get the ip addresses for all your network interfaces using ifconfig.

Powered by Wordpress   |   Lunated designed by ZenVerse