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’

3 thoughts on “One More Character In Serials”

  1. Hey Charles,
    Nice pointers. Unfortunately WordPress strikes again, your print statement isn’t displaying properly, nor the double-quotes in the middle of the arguments passed to sed. Just a heads up for those trying to copy-paste that curly quotes are not tick marks. Thanks again,

    Allister

Comments are closed.