Skip to content

Instantly share code, notes, and snippets.

@x43x61x69
Created March 21, 2016 16:43
Show Gist options
  • Save x43x61x69/9b34e47fa2f43ca1740a to your computer and use it in GitHub Desktop.
Save x43x61x69/9b34e47fa2f43ca1740a to your computer and use it in GitHub Desktop.
Get UDID / serial number and hardware version of all connected Apple device in OS X.
system_profiler SPUSBDataType | awk '/:$/{sub(/^ */,"");name=$0}/Vendor ID:/{$1=$2=$3="";vender=$0}/Version:/{version=$2}/Serial Number:/{id=$3;print name,version,id,vender}' | grep 'Apple Inc.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment