O ogg Registered Dec 23, 2002 #1 hello folks, who knows a different command to show the local ip-adress on en0? i alwalys use "ifconfig", but i get so much informations i dont need...
hello folks, who knows a different command to show the local ip-adress on en0? i alwalys use "ifconfig", but i get so much informations i dont need...
G gatorparrots ~departed~ Dec 23, 2002 #3 How to get your local IP address ifconfig en0 inet | grep 'inet ' | awk ' { print $2 } '
btoneill keeper of the cheese Dec 23, 2002 #4 Code: arp `hostname` [\code] Hah, beat that for simplicity :) Brian
G gatorparrots ~departed~ Dec 23, 2002 #5 ipconfig getifaddr en0 No backticks or errors required. If you need to get your en0 address frequently (i.e. because you are in a DHCP situation), this is the command I would alias in my ~/.*shrc file. alias 'ipconfig getifaddr en0'
ipconfig getifaddr en0 No backticks or errors required. If you need to get your en0 address frequently (i.e. because you are in a DHCP situation), this is the command I would alias in my ~/.*shrc file. alias 'ipconfig getifaddr en0'
A Arty Registered Dec 24, 2002 #6 This works fine on my Mac: ifconfig -a | grep inet | grep "netmask" | grep -v "127.0.0.1" | awk '{print $2}' Arthur
This works fine on my Mac: ifconfig -a | grep inet | grep "netmask" | grep -v "127.0.0.1" | awk '{print $2}' Arthur