Re: Get IP
Re: Get IP
- Subject: Re: Get IP
- From: Jon Pugh <email@hidden>
- Date: Fri, 24 Oct 2003 14:39:57 -0700
At 1:13 PM -0700 10/24/03, DigitEL wrote:
>
>(do shell script "ifconfig en0 | grep 'inet' | awk '{print $2}'")
>
>
Can someone illuminate why all these shell script calls only work on my machine if set to 'en1'?
>
Using 'en0' brings back a lot of info but does not contain a IP addresses.
There are a number of Ethernet interfaces on each machine. There's the built-in Ethernet, and the airport Ethernet. If you add Ethernet cards, you'll get en2, en3, etc.
Of course, the assignment of en0, en1, etc. is arbitrary, or at least controlled by what network setup the user has defined and is using. For example, both en0 and en1 are active on my machine currently, but when used in the office, the wired Ethernet is active and at home the wireless Ethernet is active.
So, you probably should check them all until you get one that is working.
Jon
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >Re: Get IP (From: DigitEL <email@hidden>) |