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’


  • June 13, 2010 - 8:14 am | Permalink

    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,


  • notpeter
    February 28, 2011 - 2:23 pm | Permalink

    Disable fancy quotes so cut/paste is possible.

    • February 28, 2011 - 2:32 pm | Permalink

      Funny enough, for new articles I started doing so a few weeks ago; however, there are about 2,500 previous articles. Ick!

  • Comments are closed.