Created
June 27, 2017 07:47
-
-
Save yourtion/ea64606774299581501eabed51e99fe2 to your computer and use it in GitHub Desktop.
Get mobile uuid from mobileprovision file path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 1 ] | |
then | |
echo "Usage: getmobileuuid the-mobileprovision-file-path" | |
exit 1 | |
fi | |
# mobileprovision_uuid=`grep UUID -A1 -a $1 | grep -o "[-A-Z0-9]\{36\}"` | |
mobileprovision_uuid=`/usr/libexec/PlistBuddy -c "Print UUID" /dev/stdin <<< $(/usr/bin/security cms -D -i $1)` | |
echo "UUID is:" | |
echo ${mobileprovision_uuid} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment