Set mac serial number as variable in terminal
I need to create a shell script that will change the mac's computer name to its serial number.
ioreg -l | grep IOPlatformSerialNumber <----will give me the serial
scutil --set ComputerName Serial_Num<----will change the computer name
so is there a way to set the serial number as a variable?
Mac OS X (10.6.7)