Hey Guys,
I am trying to get the serial number of our thunderbolt docks with ioreg or system_profiler to have an extension attribute for the docks in Casper.
So far I got this
$ system_profiler SPThunderboltDataType
Thunderbolt:
Thunderbolt Bus:
Vendor Name: Apple Inc.
Device Name: MacBook Pro
UID: 0x0001000F01673350
Firmware Version: 17,2
Domain UUID: 3F75FB1E-3A50-C95C-B5FC-0FF493EC3B19
Port:
Status: Device connected
Link Status: 0x2
Current Link Width: 0x2
Receptacle: 1
Cable Firmware Version: 1.0.16
Cable Serial Number: C4M435600SSF797A5
Link Controller Firmware Version: 0.11.0
Port:
Status: No device connected
Link Status: 0x7
Current Link Width: 0x1
Receptacle: 2
Link Controller Firmware Version: 0.11.0
Thunderbolt 2 Express Dock HD:
Vendor Name: Belkin International, Inc.
Device Name: Thunderbolt 2 Express Dock HD
Vendor ID: 0x13
Device ID: 0x85
Device Revision: 0x1
UID: 0x001314414033FB00
Route String: 1
Firmware Version: 25,1
Port (Upstream):
Status: Device connected
Link Status: 0x2
Current Link Width: 0x2
Cable Firmware Version: 1.0.16
Cable Serial Number: C4M435600SSF797A5
Link Controller Firmware Version: 0.14.0
Port:
Status: No device connected
Link Status: 0x7
Current Link Width: 0x1
Link Controller Firmware Version: 0.14.0
I know that the Serial number is the UID underneath "Thunderbolt 2 Express Dock HD:"
UID: 0x001314414033FB00
I'm not really good with grep or awk to get just the serial number which starts with 1314... wouldn't mind the 00 in front of it. But right now I also get the other UID of the mac if I use grep...
$system_profiler SPThunderboltDataType | grep " UID: "
UID: 0x0001000F01673350
UID: 0x001314414033FB00
Any idea how to get that done?
Bear with me, I'm new to this :-D
Lenny