Mac OS X,  Mac OS X Server,  Mass Deployment

One More Character In Serials

Yesterday I showed a way to get the serial number from a Mac OS X machine. However, as a couple of people pointed out, Apple will soon be adding another character to the serial number. This means that rather than use cut I should have used awk to allow for either serial number length. To grab the serial this way:

ioreg -l | grep IOPlatformSerialNumber | awk ‘{print $4}’

Or without the quotes:

ioreg -l | grep IOPlatformSerialNumber | awk ‘{print $4}’ | sed ‘s/”//g’