Re: Get System Info - How
Re: Get System Info - How
- Subject: Re: Get System Info - How
- From: Deivy Petrescu <email@hidden>
- Date: Fri, 2 Apr 2004 10:08:53 -0500
At 8:52 PM -0800 4/1/04, John W. Baxter wrote:
On 4/1/2004 18:52, "Deivy Petrescu" <email@hidden> wrote:
At 5:30 PM -0800 4/1/04, John W. Baxter wrote:
On 4/1/2004 14:35, "Walter Ian Kaye" <email@hidden> wrote:
or "ethernet address"
Good question.
do shell script "ifconfig en0 | /usr/bin/awk '/inet / {print $2}'"
Note: There's a space between "inet" and the / above...without it you get
both the IPv4 and IPv6 addresses.
Or, if you want the IPv6 address
do shell script "ifconfig en0 | /usr/bin/awk '/inet6/ {print $2}'"
--John
May be you mean
do shell script "ifconfig |grep ether" -- for
both ethernet addresses en0 and en1
or
do shell script "ifconfig (interface) | grep
ether" for interface=en0 or en1.
No, I meant what I posted, after testing both forms (and first leaving out
the space in the IPv4 form). It's not the only way to do it, of course.
--John
He asked for the ethernet address, you are returning the IP address.
Unless, you know he meant IP and wrote ethernet...
--
Regards
Saudagues
Deivy
http://www.dicas.com
_______________________________________________
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.