Re: dd: IP address via Terminal
Re: dd: IP address via Terminal
- Subject: Re: dd: IP address via Terminal
- From: Pete Yandell <email@hidden>
- Date: Wed, 27 Feb 2002 10:01:42 +1100
Using netstat or host requires valid DNS entries name lookups, therefore
may be slow or fail in some circumstances.
You should try:
ifconfig -a | grep inet | cut -f 2 -d ' ' | grep -v 127.0.0.1
This will spit out a list of all the machine's IP addresses, excluding
the loopback address.
On Wednesday, February 27, 2002, at 03:14 AM, dave wrote:
>
i'm trying to write a Terminal script that will return the IP address
>
of the current computer. i've managed to isolate my IP address using
>
netstat -i and/or netstat -r. how do i grab just the IP address from
>
the output?
>
>
if this is off-topic, i apologize, and request re-direct to appropriate
>
forum.
>
>
thanks.
>
dave dowling
>
>
free at last! how i found peace with God:
>
http://www.davedowling.com/steps.html
>
_______________________________________________
>
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.
>
>
Pete Yandell
http://pete.yandell.com/
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
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.