Getting Mac serial number
I am writing licensing code and am trying to find a way to get the unique mac serial out of the shell object. Only thing is, shell doesn't accept lines like this:
ioreg -l | awk '/IOPlatformSerialNumber/ { split($0, line, """); printf("%sn", line[4]); }'
I understand something can be done with sprintf, but I have no knowledge of scripting.
Anyone have any tips?
send this to shell works for me:
ioreg -l | grep IOPlatformSerialNumber
print: " | "IOPlatformSerialNumber" = "***********""
regexp this answer and it's done
Thanks, that's more than I got in the first place!
I'm not getting the hang of regexp. How can you use it to strip the number from this string?
Does the serial always start with a W?
here's:
Max Patch
Copy patch and select New From Clipboard in Max.
`
ad