• 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: getting my IP on OS x
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting my IP on OS x


  • Subject: Re: getting my IP on OS x
  • From: garrett <email@hidden>
  • Date: Mon, 17 Jun 2002 04:41:20 -0500

Sometime 'round 06/17/2002 02:55 AM, so and so (garbanzito) at such n such
(email@hidden) graced my inbox with this brilliant thought:

> at 2002 06 17, 02:07 -0500, they whom i call garrett wrote:
>> which from the terminal works great - returns my IP. but when I do:
>>
>> do shell script "ifconfig en0 | awk '/inet/{print $2}'"
>>
>> the result is ""
>>
>> any ideas?
>
> try
>
> do shell script "/sbin/ifconfig en0 | /usr/bin/awk '/inet/{print $2}'"
>
> because ifconfig is in /sbin, which isn't in the default do
> shell script path. you'd expect an error, but the pipe is
> effectively silencing it.
>
> awk is in the default path, but the advice some have given
> to use a full path for every command seems better every day.

woohoo! thank u very much (and for the explanation)


-------
garrett
_______________________________________________
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: getting my IP on OS x (From: garbanzito <email@hidden>)

  • Prev by Date: Extracting Address info form selected text
  • Next by Date: Re: can I do this better?
  • Previous by thread: Re: getting my IP on OS x
  • Next by thread: Extracting Address info form selected text
  • Index(es):
    • Date
    • Thread