Skip to content

Instantly share code, notes, and snippets.

@ruyaoyao
Forked from x43x61x69/udid.sh
Created March 22, 2016 05:38
Show Gist options
  • Save ruyaoyao/7a51490251f15c17c768 to your computer and use it in GitHub Desktop.
Save ruyaoyao/7a51490251f15c17c768 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