/guid
Last active
July 24, 2018 09:17
SemiRestore11 Using command "GUID"
This file contains hidden or 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 | |
COMMAND=`basename $0` | |
while getopts mhv OPTION | |
do | |
case $OPTION in | |
m ) OPTION_m="TRUE" ;; | |
h ) OPTION_h="TRUE" ;; | |
v ) OPTION_v="TRUE" ;; | |
* ) echo "Usage: $COMMAND [-h | -m]" 1>&2 | |
exit 1 ;; | |
esac | |
done | |
shift $((OPTIND - 1)) | |
if [ "$OPTION_h" = "TRUE" ]; then | |
echo "Usage: " | |
echo | |
echo " guid -h -- This help" | |
echo " guid -m -- GUID lower case letters" | |
echo " guid -v -- Version" | |
echo | |
exit 0 | |
fi | |
if [ "$OPTION_v" = "TRUE" ]; then | |
echo "guid version 0.1 (iphoneos arm64)" | |
exit 0 | |
fi | |
if [ "$OPTION_m" = "TRUE" ]; then | |
ioreg -p IODeviceTree -l | grep boot-manifest-hash | sed -E 's/\s|\||(\".{0,20}\")|[<,>,=]//g' | |
else | |
ioreg -p IODeviceTree -l | grep boot-manifest-hash | sed -E 's/\s|\||(\".{0,20}\")|[<,>,=]//g' | sed -E 's/(.)/\u\1/g' | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment