So when enrolling a mac, I would like it to be automatically named based on which country it is enrolled in
So Mac should first lookup like
curl https://freegeoip.app/xml/
and based on country code the mac should be named like "US-%serialnumber%
Serial number can be found
serialNumber=$( ioreg -c IOPlatformExpertDevice -d 2 | awk -F" '/IOPlatformSerialNumber/{print $(NF-1)}' )
I am not very good scripting, so hope someone can have some input how this could be done