Correct command to get the NIC number without System Profiler?

I need to be able to do this without opening the system profiler. I have been using the terminal window and using a bunch of different commands, but I cannot seem to be able to find the correct command to get the NIC number.

I would even be happy with the machine creation date but I cant seem to get that either. I am trying to use code such as /sbin/ifconfig but I am still struggling.

Any help would be greatly appreciated!

In Kindness
Stephen K Knight :smiley:

Would the following possibly work? Many preference files for the current user actually use the NIC’s MAC address in their name. They all reside in the /Users/~/Library/Preferences/ByHost/ folder. Here’s the script:

set sh_cd_ls_ to "cd ~/Library/Preferences/ByHost/; ls com.apple.windowserver.*" as string
set windowserver_prefs_name_ to do shell script sh_cd_ls_
set OLD_delim to AppleScript's text item delimiters
set AppleScript's text item delimiters to "."
set windowserver_prefs_name_ to text items of windowserver_prefs_name_
set MAC_address_ to fourth item of windowserver_prefs_name_
display dialog MAC_address_

Hope this helps…

Otherwise, this one might work if they’re using Panther (OS X 10.3.x):

set sh_system_profiler_ to "system_profiler SPNetworkDataType |grep \"Ethernet Address:\" |awk '{print $3}'" as string
set MAC_ to do shell script sh_system_profiler_
display dialog MAC_

Thank you for the code! I attmepted to run them both in AppleScript, but for some reason as soon as applescript hits the words “shell script” it refuses to go any further and throws up errors? I am a definite newbie at apple script so this is a little crazy for me.