Re: dd: IP address via Terminal
Re: dd: IP address via Terminal
- Subject: Re: dd: IP address via Terminal
- From: Ondra Cada <email@hidden>
- Date: Tue, 26 Feb 2002 19:01:47 +0100
dave,
>
>>>>> dave (d) wrote at Tue, 26 Feb 2002 11:14:00 -0500:
d> i'm trying to write a Terminal script that will return the IP
d> address of the current computer. i've managed to isolate my IP
d> address using netstat -i and/or netstat -r. how do i grab just the
d> IP address from the output?
Well, it's a long time when I've read man netstat, so it might miss some
special case, but I'd use something on lines of
netstat -i | awk '$1=="en0" { print $3 }'
might it help?
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.