• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get IP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get IP


  • Subject: Re: Get IP
  • From: DigitEL <email@hidden>
  • Date: Fri, 24 Oct 2003 21:02:23 -0700

Thanks All for the replies. Sure enough I do have an Airport card active on my tibook, so I guess its a repeat routine until something parses out as an octet ip.


On Friday, Oct 24, 2003, at 14:39 America/Vancouver, Jon Pugh wrote:

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.


Thanks
EL
_______________________________________________
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.

  • Follow-Ups:
    • Re: Get IP
      • From: Ian Mcginley - Systems Support Engineer <email@hidden>
  • Prev by Date: Re: Replace_chars Subroutine just doesn't work for me
  • Next by Date: Re: newbie question: real with fraction to int
  • Previous by thread: Re: Get IP
  • Next by thread: Re: Get IP
  • Index(es):
    • Date
    • Thread